AGR: How to find out that ant build terminated [message #76308] |
Wed, 05 July 2006 11:44 |
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);
|
|
|
|
Powered by
FUDForum. Page generated in 0.01945 seconds