logo       

RE: Build loop hangs when jboss isn't stopped: msg#00079

java.cruise-control.user

Subject: RE: Build loop hangs when jboss isn't stopped

Thank you for your answer Jeffrey.
 
I used a similar technique: I used the antfetch target that is available in the ant-contrib project (http://ant-contrib.sourceforge.net/).
 
This task allows you to call a task and return certain properties from this outside task. This way I return the failonerror and failonfailure to be able to decide when to fail the tests.
 
-----Original Message-----
From: cruisecontrol-user-admin@xxxxxxxxxxxxxxxxxxxxx [mailto:cruisecontrol-user-admin@xxxxxxxxxxxxxxxxxxxxx]On Behalf Of Jeffrey Fredrick
Sent: December 17, 2003 6:15 PM
To: francois.eric@xxxxxxxxxxxxxx; 'Cruise-Control-User (E-mail)'
Subject: RE: [Cruisecontrol-user] Build loop hangs when jboss isn't stopped

 
Any other ideas would be greatly appreciated.
 
So the problem is how can you indicate that the tests failed w/out failing the build right?
 
Seems you could probably return the pass/fail status of the tests in a file, and then check that file after you shut down jboss.
 
Jtf
-----Original Message-----
From: cruisecontrol-user-admin@xxxxxxxxxxxxxxxxxxxxx [mailto:cruisecontrol-user-admin@xxxxxxxxxxxxxxxxxxxxx] On Behalf Of François Eric
Sent: Wednesday, December 17, 2003 10:52 AM
To: 'Jeffrey Fredrick'; 'Cruise-Control-User (E-mail)'
Subject: RE: [Cruisecontrol-user] Build loop hangs when jboss isn't stopped

Hi,
 
Thank you for your answer but unfortunately, I cannot do the:
    <junit haltonfailure="off" failureproperty="test.failed" ...>
 
    <stopjbosstask>
 
    <fail if="test.failed" message="one or more tests failed" />
process. 
 
The reason being that my "application" build does not launch and stop jboss.  It is the cruisecontrol build that I made which calls it.  Therefore the build that is launched by cruisecontrol looks like:
 
    <startjbosstask>
 
    <ant build="appbuild.xml" target="junit.task">
 
    <stopjbosstask>
 
Inside this "junit.task", I do set the property for the haltonfailure and haltonerror so that I can generate the reports before failing the build.  But still the "ant" call will return "failed" and therefore it never reaches the <stopjbosstask>.
 
Any other ideas would be greatly appreciated.  Does anyone know why cruisecontrol waits for jboss to be closed (I'm not using parallel ant tasks by the way)?
 
Thank you,
 
François
 
-----Original Message-----
From: Jeffrey Fredrick [mailto:jtf@xxxxxxxxxx]
Sent: December 17, 2003 1:03 PM
To: francois.eric@xxxxxxxxxxxxxx; 'Cruise-Control-User (E-mail)'
Subject: RE: [Cruisecontrol-user] Build loop hangs when jboss isn't stopped

>> Why does it hang when launched from cruisecontrol?
 
What if you try running it with the same command-line that CC uses?
 
(Can use DEBUG to find that command line: http://c2.com/w4/cc/wiki.cgi?TurnOnDebug )
 
>> How can I avoid this?
 
Instead of doing haltonfailure with your junit task set a failure property, then after jboss is shutdown you can use the fail task to fail if that property is set. http://ant.apache.org/manual/OptionalTasks/junit.html
 
It would be something like:
 
<junit haltonfailure="off" failureproperty="test.failed" ...>
 
<stopjbosstask>
 
<fail if="test.failed" message="one or more tests failed" />
 
Jtf
 
-----Original Message-----
From: cruisecontrol-user-admin@xxxxxxxxxxxxxxxxxxxxx [mailto:cruisecontrol-user-admin@xxxxxxxxxxxxxxxxxxxxx] On Behalf Of François Eric
Sent: Wednesday, December 17, 2003 8:10 AM
To: Cruise-Control-User (E-mail)
Subject: [Cruisecontrol-user] Build loop hangs when jboss isn't stopped

Hello,
 
I am encountering a very annoying problem. 
 
Here is a short resume of what the build that cruisecontrol launches does:
 
- compile
- compile tests
- stop jboss (in case still running)
- launch jboss
- run tests
- stop jboss
If the tests fail during the build, cruisecontrol hangs.  It is waiting for jboss to be shutdown but the build doesn't reach the shutdown of jboss since it fails before.  If I manually kill the appserver (when it is hung) it will resume and complete successfully.
 

If I launch this task manually (eg: ant -f build-SAGE.xml -Dbuild.properties.file=../sage.properties") everything is fine and the build completes (fails but completes) even though jboss is still running.

Why does it hang when launched from cruisecontrol? How can I avoid this?
 
Thank you,
 
François
 
PS: Here is the command in the config.xml of cruisecontrol:
 
            <ant buildfile="build-SAGE.xml"
                 target="all"
                 uselogger="true"
                 usedebug="false"
                 antscript="C:\Java\ant\bin\ant.bat">
                <property name="build.properties.file" value="../sage.properties"/>
            </ant>
 
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise