I have a similar question about timeouts in TestNG. I've run the following code under testng4.6-jdk1.5 and testng4.7beta-jdk1.5. The timeoutShouldFailByTimeOut method would pass the test.
It looks like the timeOut attribute is only appliable to test methods but not test classes.
@TimeOutTest ( timeOut = 5000L)
public class Test {
@Test()
public void timeoutShouldPass() { }
@Test()
public void timeoutShouldFailByException() {
throw new RuntimeException("EXCEPTION SHOULD MAKE THIS METHOD FAIL");
}
@Test()
public void timeoutShouldFailByTimeOut() throws InterruptedException {
Thread.sleep(10 * 1000 /* 10 seconds */);
}
}
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=1675&messageID=57097#57097
http://membres.lycos.fr/cquezel/
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=1675&messageID=57197#57197