当我启动一个通过Maven运行GWTTestCase的Jenkins作业时,该作业会随机失败,并出现相同的异常。我无法在Eclipse中重现这种行为。以下是例外情况。
<testcase time="300.144" classname="client.gdo.model.impl.GwtTestLevelOfDetailDefinition" name="testGetAttributesAfterJsonParse">
<error message="The browser did not complete the test method WebFrameworkClientTest.JUnit:client.gdo.model.impl.GwtTestLevelOfDetailDefinition.testGetAttributesAfterJsonParse in 300000ms.
We have no results from:
161.134.22.175 / Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.19) Gecko/2010031422 Firefox/3.0.19
Actual time elapsed: 300.144 seconds.
Try increasing this timeout using the '-testMethodTimeout minutes' option
" type="com.google.gwt.junit.client.TimeoutException">com.google.gwt.junit.client.TimeoutException: The browser did not complete the test method WebFrameworkClientTest.JUnit:client.gdo.model.impl.GwtTestLevelOfDetailDefinition.testGetAttributesAfterJsonParse in 300000ms.
We have no results from:
161.134.22.175 / Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.19) Gecko/2010031422 Firefox/3.0.19
Actual time elapsed: 300.144 seconds.
Try increasing this timeout using the '-testMethodTimeout minutes' option
at com.google.gwt.junit.JUnitShell.notDone(JUnitShell.java:1031)
at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:1381)
at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:1309)
at com.google.gwt.junit.JUnitShell.runTest(JUnitShell.java:653)
at com.google.gwt.junit.client.GWTTestCase.runTest(GWTTestCase.java:441)
我相信这是因为根据您的体系结构,GWTTestCase
执行起来可能很长。
如错误日志中所示,尝试增加超时时间。