Maven2 junit timeout annotation doesn't work
        Posted  
        
            by roesslerj
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by roesslerj
        
        
        
        Published on 2010-04-22T08:21:46Z
        Indexed on 
            2010/04/22
            8:23 UTC
        
        
        Read the original article
        Hit count: 260
        
We have a bunch of tests in a maven2 project and build with cruisecontrol. However the build regularly hangs, because the annotation of the test with a timeout
@Test(timeout = 5000)
is ignored. I tried and run maven locally, reproducing the fact, that the timeout is ignored.
Is there a way to activate the timeout for the tests again?
I currently use a work arround in setting a timeout in cruisecontrol. However this simply means that the whole build is chancelled, and not just the tests that should fail.
Remark: It seems in maven 1 there was a property to activate the junit timeout which is missing in maven 2.
© Stack Overflow or respective owner