You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "james strachan (JIRA)" <ji...@codehaus.org> on 2006/04/27 18:14:19 UTC

[jira] Created: (CONTINUUM-667) need a way to limit the mount of time a unit test runs for

need a way to limit the mount of time a unit test runs for
----------------------------------------------------------

         Key: CONTINUUM-667
         URL: http://jira.codehaus.org/browse/CONTINUUM-667
     Project: Continuum
        Type: Bug

  Components: Web interface, Core system  
    Versions: 1.0.3    
    Reporter: james strachan
    Priority: Blocker


We get lots of builds hanging in CI due to test cases with timing issues on different platforms. (You'd be amazed how easy that is to do). We need a way to put in a maximum amount of time (say 5 minutes) for a single unit test - or a max time per entire test run (say 1 hour) so that we can be alerted if a test hangs.

If a test hangs it normally hoses the entire CI server. The worst thing is this makes the entire CI useless since it does no more builds and we don't know its failed.

I understand there are complications in killing stuff in Java. (Though java.lang.Process.destroy() works for most things). One option is to just have a status XML file we can poll for on a canoncial URL

http;//serverhost/module/status.xml

then we can look to see if any of the builds are blocked and if they are we can get nagios or something to reboot the box / restart the CI server etc.



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (CONTINUUM-667) need a way to limit the mount of time a unit test runs for

Posted by "Emmanuel Venisse (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/CONTINUUM-667?page=all ]

Emmanuel Venisse updated CONTINUUM-667:
---------------------------------------

    Fix Version: 1.1

> need a way to limit the mount of time a unit test runs for
> ----------------------------------------------------------
>
>          Key: CONTINUUM-667
>          URL: http://jira.codehaus.org/browse/CONTINUUM-667
>      Project: Continuum
>         Type: Bug

>   Components: Web interface, Core system
>     Versions: 1.0.3
>     Reporter: james strachan
>     Priority: Blocker
>      Fix For: 1.1

>
>
> We get lots of builds hanging in CI due to test cases with timing issues on different platforms. (You'd be amazed how easy that is to do). We need a way to put in a maximum amount of time (say 5 minutes) for a single unit test - or a max time per entire test run (say 1 hour) so that we can be alerted if a test hangs.
> If a test hangs it normally hoses the entire CI server. The worst thing is this makes the entire CI useless since it does no more builds and we don't know its failed.
> I understand there are complications in killing stuff in Java. (Though java.lang.Process.destroy() works for most things). One option is to just have a status XML file we can poll for on a canoncial URL
> http;//serverhost/module/status.xml
> then we can look to see if any of the builds are blocked and if they are we can get nagios or something to reboot the box / restart the CI server etc.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (CONTINUUM-667) need a way to limit the mount of time a unit test runs for

Posted by "Kenney Westerhof (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/CONTINUUM-667?page=comments#action_74860 ] 
            
Kenney Westerhof commented on CONTINUUM-667:
--------------------------------------------

Yes, this is complete.

But process killing on windows still needs some attention, that why I didn't close it yet.

I'm happy to create a new issue in PLX for plexus-utils to address this and close this. It requires no change in
continuum code.

> need a way to limit the mount of time a unit test runs for
> ----------------------------------------------------------
>
>                 Key: CONTINUUM-667
>                 URL: http://jira.codehaus.org/browse/CONTINUUM-667
>             Project: Continuum
>          Issue Type: Bug
>          Components: Core system, Web interface
>    Affects Versions: 1.0.3
>            Reporter: james strachan
>         Assigned To: Kenney Westerhof
>            Priority: Blocker
>             Fix For: 1.1
>
>
> We get lots of builds hanging in CI due to test cases with timing issues on different platforms. (You'd be amazed how easy that is to do). We need a way to put in a maximum amount of time (say 5 minutes) for a single unit test - or a max time per entire test run (say 1 hour) so that we can be alerted if a test hangs.
> If a test hangs it normally hoses the entire CI server. The worst thing is this makes the entire CI useless since it does no more builds and we don't know its failed.
> I understand there are complications in killing stuff in Java. (Though java.lang.Process.destroy() works for most things). One option is to just have a status XML file we can poll for on a canoncial URL
> http;//serverhost/module/status.xml
> then we can look to see if any of the builds are blocked and if they are we can get nagios or something to reboot the box / restart the CI server etc.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (CONTINUUM-667) need a way to limit the mount of time a unit test runs for

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/CONTINUUM-667?page=comments#action_74814 ] 
            
Brett Porter commented on CONTINUUM-667:
----------------------------------------

I think this is complete - Kenney, can you confirm?

> need a way to limit the mount of time a unit test runs for
> ----------------------------------------------------------
>
>                 Key: CONTINUUM-667
>                 URL: http://jira.codehaus.org/browse/CONTINUUM-667
>             Project: Continuum
>          Issue Type: Bug
>          Components: Core system, Web interface
>    Affects Versions: 1.0.3
>            Reporter: james strachan
>         Assigned To: Kenney Westerhof
>            Priority: Blocker
>             Fix For: 1.1
>
>
> We get lots of builds hanging in CI due to test cases with timing issues on different platforms. (You'd be amazed how easy that is to do). We need a way to put in a maximum amount of time (say 5 minutes) for a single unit test - or a max time per entire test run (say 1 hour) so that we can be alerted if a test hangs.
> If a test hangs it normally hoses the entire CI server. The worst thing is this makes the entire CI useless since it does no more builds and we don't know its failed.
> I understand there are complications in killing stuff in Java. (Though java.lang.Process.destroy() works for most things). One option is to just have a status XML file we can poll for on a canoncial URL
> http;//serverhost/module/status.xml
> then we can look to see if any of the builds are blocked and if they are we can get nagios or something to reboot the box / restart the CI server etc.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (CONTINUUM-667) need a way to limit the mount of time a unit test runs for

Posted by "Carlos Sanchez (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/CONTINUUM-667?page=comments#action_74284 ] 
            
Carlos Sanchez commented on CONTINUUM-667:
------------------------------------------

I'm geeting the following test failures in my machine Win XP, cygwin. I'm using the acegi-continuum branch that we just merged from trunk.

-------------------------------------------------------------------------------
Test set: org.apache.maven.continuum.buildcontroller.BuildProjectTaskExecutorTest
-------------------------------------------------------------------------------
Tests run: 3, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 39.312 sec <<< FAILURE!
testAutomaticCancellation(org.apache.maven.continuum.buildcontroller.BuildProjectTaskExecutorTest)  Time elapsed: 13.672 sec  <<< FAILURE!
junit.framework.AssertionFailedError: File src/test-projects/timeout/target/TEST-STARTED
	at junit.framework.Assert.fail(Assert.java:47)
	at junit.framework.Assert.assertTrue(Assert.java:20)
	at org.apache.maven.continuum.buildcontroller.BuildProjectTaskExecutorTest.waitForFile(BuildProjectTaskExecutorTest.java:144)
	at org.apache.maven.continuum.buildcontroller.BuildProjectTaskExecutorTest.runTimeoutProject(BuildProjectTaskExecutorTest.java:205)
	at org.apache.maven.continuum.buildcontroller.BuildProjectTaskExecutorTest.testAutomaticCancellation(BuildProjectTaskExecutorTest.java:78)

testManualCancellation(org.apache.maven.continuum.buildcontroller.BuildProjectTaskExecutorTest)  Time elapsed: 12.937 sec  <<< FAILURE!
junit.framework.AssertionFailedError: File src/test-projects/timeout/target/TEST-STARTED
	at junit.framework.Assert.fail(Assert.java:47)
	at junit.framework.Assert.assertTrue(Assert.java:20)
	at org.apache.maven.continuum.buildcontroller.BuildProjectTaskExecutorTest.waitForFile(BuildProjectTaskExecutorTest.java:144)
	at org.apache.maven.continuum.buildcontroller.BuildProjectTaskExecutorTest.runTimeoutProject(BuildProjectTaskExecutorTest.java:205)
	at org.apache.maven.continuum.buildcontroller.BuildProjectTaskExecutorTest.testManualCancellation(BuildProjectTaskExecutorTest.java:100)

testNoCancellation(org.apache.maven.continuum.buildcontroller.BuildProjectTaskExecutorTest)  Time elapsed: 12.688 sec  <<< FAILURE!
junit.framework.AssertionFailedError: File src/test-projects/timeout/target/TEST-STARTED
	at junit.framework.Assert.fail(Assert.java:47)
	at junit.framework.Assert.assertTrue(Assert.java:20)
	at org.apache.maven.continuum.buildcontroller.BuildProjectTaskExecutorTest.waitForFile(BuildProjectTaskExecutorTest.java:144)
	at org.apache.maven.continuum.buildcontroller.BuildProjectTaskExecutorTest.runTimeoutProject(BuildProjectTaskExecutorTest.java:205)
	at org.apache.maven.continuum.buildcontroller.BuildProjectTaskExecutorTest.testNoCancellation(BuildProjectTaskExecutorTest.java:121)



> need a way to limit the mount of time a unit test runs for
> ----------------------------------------------------------
>
>                 Key: CONTINUUM-667
>                 URL: http://jira.codehaus.org/browse/CONTINUUM-667
>             Project: Continuum
>          Issue Type: Bug
>          Components: Core system, Web interface
>    Affects Versions: 1.0.3
>            Reporter: james strachan
>         Assigned To: Kenney Westerhof
>            Priority: Blocker
>             Fix For: 1.1
>
>
> We get lots of builds hanging in CI due to test cases with timing issues on different platforms. (You'd be amazed how easy that is to do). We need a way to put in a maximum amount of time (say 5 minutes) for a single unit test - or a max time per entire test run (say 1 hour) so that we can be alerted if a test hangs.
> If a test hangs it normally hoses the entire CI server. The worst thing is this makes the entire CI useless since it does no more builds and we don't know its failed.
> I understand there are complications in killing stuff in Java. (Though java.lang.Process.destroy() works for most things). One option is to just have a status XML file we can poll for on a canoncial URL
> http;//serverhost/module/status.xml
> then we can look to see if any of the builds are blocked and if they are we can get nagios or something to reboot the box / restart the CI server etc.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (CONTINUUM-667) need a way to limit the mount of time a unit test runs for

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/CONTINUUM-667?page=all ]

Brett Porter closed CONTINUUM-667.
----------------------------------

    Resolution: Fixed

> need a way to limit the mount of time a unit test runs for
> ----------------------------------------------------------
>
>                 Key: CONTINUUM-667
>                 URL: http://jira.codehaus.org/browse/CONTINUUM-667
>             Project: Continuum
>          Issue Type: Bug
>          Components: Core system, Web interface
>    Affects Versions: 1.0.3
>            Reporter: james strachan
>         Assigned To: Kenney Westerhof
>            Priority: Blocker
>             Fix For: 1.1
>
>
> We get lots of builds hanging in CI due to test cases with timing issues on different platforms. (You'd be amazed how easy that is to do). We need a way to put in a maximum amount of time (say 5 minutes) for a single unit test - or a max time per entire test run (say 1 hour) so that we can be alerted if a test hangs.
> If a test hangs it normally hoses the entire CI server. The worst thing is this makes the entire CI useless since it does no more builds and we don't know its failed.
> I understand there are complications in killing stuff in Java. (Though java.lang.Process.destroy() works for most things). One option is to just have a status XML file we can poll for on a canoncial URL
> http;//serverhost/module/status.xml
> then we can look to see if any of the builds are blocked and if they are we can get nagios or something to reboot the box / restart the CI server etc.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (CONTINUUM-667) need a way to limit the mount of time a unit test runs for

Posted by "Kenney Westerhof (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/CONTINUUM-667?page=comments#action_74334 ] 
            
Kenney Westerhof commented on CONTINUUM-667:
--------------------------------------------

The tests fail on windows because the process (the forked 'mvn') is not terminated due to window's bad process handling.
The batch file is terminated, but it's child processes aren't.

2 solutions:

* brett proposed we add something like -Dcontinuum.buildId=X to the commandline and grep the output
  using pstools or some other windows 'ps' and 'kill' capable tool to terminate the jvm started from batch files.

* we don't use the batchfiles but call java directly. All we need for this is the location of maven (using $M2_HOME)
  or grab the output of 'mvn --print-commandline <normal commandline>' which would print the commandline calling
  java; then we run that directly. That process is easily killed.

> need a way to limit the mount of time a unit test runs for
> ----------------------------------------------------------
>
>                 Key: CONTINUUM-667
>                 URL: http://jira.codehaus.org/browse/CONTINUUM-667
>             Project: Continuum
>          Issue Type: Bug
>          Components: Core system, Web interface
>    Affects Versions: 1.0.3
>            Reporter: james strachan
>         Assigned To: Kenney Westerhof
>            Priority: Blocker
>             Fix For: 1.1
>
>
> We get lots of builds hanging in CI due to test cases with timing issues on different platforms. (You'd be amazed how easy that is to do). We need a way to put in a maximum amount of time (say 5 minutes) for a single unit test - or a max time per entire test run (say 1 hour) so that we can be alerted if a test hangs.
> If a test hangs it normally hoses the entire CI server. The worst thing is this makes the entire CI useless since it does no more builds and we don't know its failed.
> I understand there are complications in killing stuff in Java. (Though java.lang.Process.destroy() works for most things). One option is to just have a status XML file we can poll for on a canoncial URL
> http;//serverhost/module/status.xml
> then we can look to see if any of the builds are blocked and if they are we can get nagios or something to reboot the box / restart the CI server etc.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (CONTINUUM-667) need a way to limit the mount of time a unit test runs for

Posted by "james strachan (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/CONTINUUM-667?page=comments#action_67171 ] 

james strachan commented on CONTINUUM-667:
------------------------------------------

Sounds good to me :)

> need a way to limit the mount of time a unit test runs for
> ----------------------------------------------------------
>
>          Key: CONTINUUM-667
>          URL: http://jira.codehaus.org/browse/CONTINUUM-667
>      Project: Continuum
>         Type: Bug

>   Components: Web interface, Core system
>     Versions: 1.0.3
>     Reporter: james strachan
>     Priority: Blocker

>
>
> We get lots of builds hanging in CI due to test cases with timing issues on different platforms. (You'd be amazed how easy that is to do). We need a way to put in a maximum amount of time (say 5 minutes) for a single unit test - or a max time per entire test run (say 1 hour) so that we can be alerted if a test hangs.
> If a test hangs it normally hoses the entire CI server. The worst thing is this makes the entire CI useless since it does no more builds and we don't know its failed.
> I understand there are complications in killing stuff in Java. (Though java.lang.Process.destroy() works for most things). One option is to just have a status XML file we can poll for on a canoncial URL
> http;//serverhost/module/status.xml
> then we can look to see if any of the builds are blocked and if they are we can get nagios or something to reboot the box / restart the CI server etc.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (CONTINUUM-667) need a way to limit the mount of time a unit test runs for

Posted by "David Roussel (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/CONTINUUM-667?page=comments#action_74669 ] 
            
David Roussel commented on CONTINUUM-667:
-----------------------------------------

> We need a way to put in a maximum amount of time (say 5 minutes) for a single unit test 

Surely this should be a feature of your testing framework?  Junit, test-ng, or whatever.  
If you wanted to limit the time of a whole build then that could be done in continuum, but it could be agued that it's the job of the build script (maven, ant, etc).

I don't see how continuum could monitor this at the level of individual unit tests.

> need a way to limit the mount of time a unit test runs for
> ----------------------------------------------------------
>
>                 Key: CONTINUUM-667
>                 URL: http://jira.codehaus.org/browse/CONTINUUM-667
>             Project: Continuum
>          Issue Type: Bug
>          Components: Core system, Web interface
>    Affects Versions: 1.0.3
>            Reporter: james strachan
>         Assigned To: Kenney Westerhof
>            Priority: Blocker
>             Fix For: 1.1
>
>
> We get lots of builds hanging in CI due to test cases with timing issues on different platforms. (You'd be amazed how easy that is to do). We need a way to put in a maximum amount of time (say 5 minutes) for a single unit test - or a max time per entire test run (say 1 hour) so that we can be alerted if a test hangs.
> If a test hangs it normally hoses the entire CI server. The worst thing is this makes the entire CI useless since it does no more builds and we don't know its failed.
> I understand there are complications in killing stuff in Java. (Though java.lang.Process.destroy() works for most things). One option is to just have a status XML file we can poll for on a canoncial URL
> http;//serverhost/module/status.xml
> then we can look to see if any of the builds are blocked and if they are we can get nagios or something to reboot the box / restart the CI server etc.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (CONTINUUM-667) need a way to limit the mount of time a unit test runs for

Posted by "Shinobu Kawai (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/CONTINUUM-667?page=comments#action_67167 ] 

Shinobu Kawai commented on CONTINUUM-667:
-----------------------------------------

Since CONTINUUM-669 was marked as a duplicate of this issue, I would like this to be expanded to a more generic scope.  A timeout should be able to be set per build, not only testing phase, as any phase of the build has a potential to hang.

> need a way to limit the mount of time a unit test runs for
> ----------------------------------------------------------
>
>          Key: CONTINUUM-667
>          URL: http://jira.codehaus.org/browse/CONTINUUM-667
>      Project: Continuum
>         Type: Bug

>   Components: Web interface, Core system
>     Versions: 1.0.3
>     Reporter: james strachan
>     Priority: Blocker

>
>
> We get lots of builds hanging in CI due to test cases with timing issues on different platforms. (You'd be amazed how easy that is to do). We need a way to put in a maximum amount of time (say 5 minutes) for a single unit test - or a max time per entire test run (say 1 hour) so that we can be alerted if a test hangs.
> If a test hangs it normally hoses the entire CI server. The worst thing is this makes the entire CI useless since it does no more builds and we don't know its failed.
> I understand there are complications in killing stuff in Java. (Though java.lang.Process.destroy() works for most things). One option is to just have a status XML file we can poll for on a canoncial URL
> http;//serverhost/module/status.xml
> then we can look to see if any of the builds are blocked and if they are we can get nagios or something to reboot the box / restart the CI server etc.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (CONTINUUM-667) need a way to limit the mount of time a unit test runs for

Posted by "james strachan (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/CONTINUUM-667?page=comments#action_64300 ] 

james strachan commented on CONTINUUM-667:
------------------------------------------

Incidentally just knowing that there is a blocked build would mean we can reboot the CI servers every night and mail folks with details of the test that blocked.

(BTW knowing the test which hung would be very useful in the XML doc)

> need a way to limit the mount of time a unit test runs for
> ----------------------------------------------------------
>
>          Key: CONTINUUM-667
>          URL: http://jira.codehaus.org/browse/CONTINUUM-667
>      Project: Continuum
>         Type: Bug

>   Components: Web interface, Core system
>     Versions: 1.0.3
>     Reporter: james strachan
>     Priority: Blocker

>
>
> We get lots of builds hanging in CI due to test cases with timing issues on different platforms. (You'd be amazed how easy that is to do). We need a way to put in a maximum amount of time (say 5 minutes) for a single unit test - or a max time per entire test run (say 1 hour) so that we can be alerted if a test hangs.
> If a test hangs it normally hoses the entire CI server. The worst thing is this makes the entire CI useless since it does no more builds and we don't know its failed.
> I understand there are complications in killing stuff in Java. (Though java.lang.Process.destroy() works for most things). One option is to just have a status XML file we can poll for on a canoncial URL
> http;//serverhost/module/status.xml
> then we can look to see if any of the builds are blocked and if they are we can get nagios or something to reboot the box / restart the CI server etc.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira