I'm working on a web app using GWT and GXT with lots of unit testing. Running the tests outside of production mode works as I would expect. As soon as I attempt to execute the GWT test cases in production mode (or compile for more than 1 browser) I receive the following error:
com.google.gwt.junit.client.TimeoutException
message="The browser did not contact the server within 60000ms. - 1 client(s) haven't responded back to JUnitShell since the start of the test. Actual time elapsed: 60.008 seconds.
Try increasing this timeout using the '-testBeginTimeout minutes' option The default value of minutes is 1, i.e., the server waits 1 minute or 60 seconds. ">
com.google.gwt.junit.client.TimeoutException: The browser did not contact the server within 60000ms. - 1 client(s) haven't responded back to JUnitShell since the start of the test.
Actual time elapsed: 60.008 seconds. Try increasing this timeout using the '-testBeginTimeout minutes' option The default value of minutes is 1, i.e., the server waits 1 minute or 60 seconds.
at com.google.gwt.junit.JUnitShell.notDone(JUnitShell.java:1041)
at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:1376)
at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:1304)
at com.google.gwt.junit.JUnitShell.runTest(JUnitShell.java:652)
at com.google.gwt.junit.client.GWTTestCase.runTest(GWTTestCase.java:441)
at com.google.gwt.junit.client.GWTTestCase.run(GWTTestCase.java:296)
Again, without the production mode settings (and only compiling for only one browser) the GWT testing works fine, the problem rears its head when tests are executed using the additional parameters (or when compiling for more than 1 browser):
<sysproperty key="gwt.args" value="-prod -standardsMode -logLevel WARN" />
<sysproperty key="java.awt.headless" value="true" />
I've tried to increase the timeout before beginning the test (-testBeginTimeout), with similar results (the only difference being the longer delay before failure). I've also tried to increase the time it waits before timing out while executing the test with the same results.
As hinted to above, this issue also appears when attempting to run GWTTestCase tests after compiling for multiple browsers. I'm at a bit of a loss to explain either issue and subsequent google searches have failed to turn up any useful information.
This seems like a configuration issue, either with GWT or my ANT setup but I cannot seem to narrow it down any further. Has anyone else encountered this problem and have some badly needed advice for me?
Single Browser Compilation: chrome
Multi-browser Compilation: chrome,gecko1_8,ie8
Libs:
GWT Version: 2.5.0rc1
GXT Version: 3.0.0b
Junit Version: 4.11 (also tried 4.10)
This turns out to be an issue with specifying the "gxt.user.agent" property in the gwt.xml file. By specifying GWT's "user.agent" property instead, I am now able to compile for multiple browsers and execute my tests without the GWTTestCase tests failing to get a connection from the browser.