Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8035787
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:24:51+00:00 2026-06-05T02:24:51+00:00

I am doing functional testing with geb. My application is deployed using virgo and

  • 0

I am doing functional testing with geb.

My application is deployed using virgo and uses HSQLDB to store data. I would like to perform tests on this working version of application, but I would like to start with empty database, every time I run webtests.

I wrote a simple bash script

#!/bin/sh
rm -rf $VIRGO_HOME/aresdb*
$VIRGO_HOME/bin/shutdown.sh &
sleep 10
$VIRGO_HOME/bin/startup.sh &

which removes the database and restarts virgo.

However, when I add it to my build.gradle task executing command never ends.

task cleanDB(type: Exec) {
    commandLine './clean.sh' 
}

Why is it this way? When I run this script in console it returns quickly (but virgo still writes to the console).

I have tried to run it in separate thread, but I encountered following error:

task cleanDBThread()<<{
    def cleanDBThread1 = Thread.start {
         cleanDB.execute()
    }
    sleep 10000
    println "wake up!"
}

Exception in thread "Thread-32" java.lang.IllegalStateException:
Cannot start long running operation, as the task artifact state cache
(/home/tomasz/ares/.gradle/1.0-milestone-9/taskArtifacts) has not been locked.

I also tried setting ‘create-drop’ in hibernate configuration, but it also requires restarting virgo. Even redeploying the application does not help.

What should I do to run webtests with empty database?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T02:24:52+00:00Added an answer on June 5, 2026 at 2:24 am

    That’s weird

    I created a task

    task callCL(type: Exec) {
        commandLine './cl.sh'
    }
    

    that calls cl.sh file

    #!/bin/sh
    echo "starting "
    ./acl.sh &
    sleep 10
    ./acl.sh &
    

    that call acl.sh

    #!/bin/sh
    echo "I am not doing anything"
    

    and it worked! but one thing though, when you add ./acl.sh ampersand character & you’re calling the task from a different thread that started gradle, and kinda looks like it’s hanging. I would remove the & from your calls to shutdown and start like this

    #!/bin/sh
    rm -rf $VIRGO_HOME/aresdb*
    $VIRGO_HOME/bin/shutdown.sh
    $VIRGO_HOME/bin/startup.sh
    

    anyways you want to wait in the same thread from shutdown to start, and no need to call sleep too!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I findy myself doing a lot of puts .inpsect s in my functional testing
I am doing smoke testing in my existing asp.net web application, I have developed
I'm doing some functional testing in my Symfony2 app, and want to assert controller
I'm currently doing a highlighting function on a webpage and im using the jquery
I am new to JQuery I am writing a simple data validation using JQuery.
I am using my php to call a js function like this: <?php $chk=1;
I'm doing some testing with the Jasmine framework and I want to spy on
I've been doing a bit of testing on some code I wrote when I
My app is in beta, and I've been doing limited testing of a feature
I'm doing some testing and optimizing on a JavaScript function I made. I notice

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.