You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the attribute parallel is set to "tests", the suite level timeout doesn't work as expected, although the main thread report that the test finished already, but the individual tests actually still keep running until the end.
With parallel="tests" mode, the test level timeout just get ignored by using the default timeout value - infinity.
Communicated with Krishnan Mahadevan in groups, and use simple example from him below, you can also try suite-level timeout setting to reproduce the issue:
publicclassTimeOuts {
@Test (timeOut = 1000)
publicvoidmyTestMethod() {
try {
System.err.println("Commencing sleep");
Thread.sleep(1500);
System.err.println("Sleep completed");
} catch (Exceptione) {
e.printStackTrace();
}
}
publicstaticvoidmain(String[] args) {
TestNGtestNG = newTestNG();
testNG.setVerbose(2);
// testNG.setParallel("tests");// If setParallel("tests") is commented out then timeout happens else there are// no timeouts.testNG.setTestClasses(newClass[] {TimeOuts.class});
Stringversion = newFile(TestNG.class.getProtectionDomain().getCodeSource()
.getLocation().getFile()).getParentFile().getName();
System.err.println("TestNG Version : " + version);
testNG.run();
}
}
The text was updated successfully, but these errors were encountered:
When the attribute parallel is set to "tests", the suite level timeout doesn't work as expected, although the main thread report that the test finished already, but the individual tests actually still keep running until the end.
With parallel="tests" mode, the test level timeout just get ignored by using the default timeout value - infinity.
Communicated with Krishnan Mahadevan in groups, and use simple example from him below, you can also try suite-level timeout setting to reproduce the issue:
The text was updated successfully, but these errors were encountered: