Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Test and Performance Tools Platform (TPTP) » AGR: How to find out that ant build terminated
AGR: How to find out that ant build terminated [message #76308] Wed, 05 July 2006 07:44 Go to previous message
Eclipse User
Originally posted by: ffr.softwareag.com

Hi,
I recorded a 'Run As' --> 'Ant Build' on a build.xml file with verification
hook (target is the Console view). My goal with the verification hook was to
recognize termination and success of the ant build (without doing anything
the test execution goes on after the build process is started without
waiting for the end of the build process). Unfortunately my implementation
of the verification hook blocks the ant build when the test suite comes to
the mentioned test case during execution and I don't know why. Could anybody
explain? Am I on the right way at all or are there better approaches to my
problem?
Here is the core code of my verification hook that is intended to recognize
the termination of the ant build. The max wait time of 20 seconds is always
exceeded and the assertion fails. After that, the so long blocked ant build
is going on.
long maxWaitForBuildTermination = 20000L;
long cumulatedWaitTime = 0L;
while (cumulatedWaitTime <= maxWaitForBuildTermination) {
if (consoleView.getTitle() != null &&
consoleView.getTitle().indexOf("<terminated>") > 0) {
break;
} else {
Thread.sleep(500L);
cumulatedWaitTime += 500L;
}
}
assertTrue(cumulatedWaitTime <= maxWaitForBuildTermination);
 
Read Message
Read Message
Previous Topic:Running recorded test
Next Topic:Attaching to weblogic 8.1 using IAC
Goto Forum:
  


Current Time: Sat May 25 11:20:30 EDT 2013

Powered by FUDForum. Page generated in 0.03679 seconds