本案例在testng中遇到,意思是用例超过了,写的超时时间,把超时时间改大点就行了。
didn't finish within the time-out 60000
public class TestTimeout {
@Test(timeOut = 5000) // time in mulliseconds
public void testThisShouldPass() throws InterruptedException {
Thread.sleep(4000);
}
@Test(timeOut = 1000)
public void testThisShouldFail() {
while (true);
}
该博客讨论了在TestNG测试框架中遇到的超时问题。作者指出,当测试用例执行超过预设的超时时间(如5000毫秒)时,可以通过增加超时时间来避免测试失败。示例中展示了如何通过修改`@Test`注解的时间参数来调整超时限制,例如将超时时间改为10000毫秒。
916

被折叠的 条评论
为什么被折叠?



