Or... you can save time and rely on JUnit to stop the test thread and fail the test (a TimeoutException is thrown), simply passing the desired timeout value to the @Test annotation:
@Test(timeout=1000)
public void testWithTimeout() {
...
}
...or how to be heavyweight and agile at the same time
@Test(timeout=1000)
public void testWithTimeout() {
...
}
No comments:
Post a Comment