That timeout means that GWT has launched a browser pointed at itself, to run the test, but the browser didn't actually connect to us within 60 seconds. The constant isn't directly configurable, no, but it's not about the size of your test, just getting that first useful access from the browser (so it's supposed to encompass browser start time + network latency; 60s should be way over adequate!).
I have seen the timeout message happen due to a compile error in the GWT code, but you'd see those errors in the log also. I don't know much about the maven codehaus plugin, but here's roughly what GWT tests do: 1. GWT sets itself up as a web server on some random port. JUnitShell derives off the older GWTShell, so this should mean using our internal tomcat as the server. (I'm not sure your "tomcat with the cargo plugin" is relevant!) 2. That server is set to serve a synthetic GWT module, which is created via a generator that can reflect on your test code. 3. Depending on the -runStyle flag, GWT chooses a browser to launch. By default, we'd use HtmlUnit (mostly because we know where it is!), but there are other options available, including Manual (which has no timeout, and expects you to point a browser at GWT's server) and External (you give GWT an executable that accepts a URL as an argument). 4. If the browser we launch doesn't successfully access the web server we have, on that random port, you will get the timeout you cite. If it does access in time, the page should pull your code and start walking through the tests, reporting status and moving to the next test (or batch, depending on your batch strategy). I hope that helps. HtmlUnit does have some known issues, so especially if you see this happening "sometimes" you might want to experiment with either -runStyle Manual or -runStyle External to see if those are better-behaved for you. On Fri, Oct 1, 2010 at 9:06 AM, Ed <[email protected]> wrote: > Sometimes my GWT test's fail (during nightly build) and give me the > following error. > ----- > [INFO] com.google.gwt.junit.client.TimeoutException: The browser did > not contact the server within 60000ms. > [INFO] - NO RESPONSE: 192.168.1.65 / Mozilla/5.0 (Windows; U; Windows > NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1 > [INFO] - 1 client(s) haven't responded back to JUnitShell since the > start of the test. > [INFO] Actual time elapsed: 60.004 seconds. > ------ > > This occurs when running my tests through the maven codehaus plugin, > starting first tomcat with the cargo plugin. > I played with the timeout settings I have in the maven and cargo > plugin, but don't seem to be able to solve it. > The maven plugin will run GWT test suites that extend from > GWTTestSuite that contain test cases that extend GWTTestCase. > The first GWT test suite always run with success and then the > following GWT test suite gives the above error > > The code in JUnitShell throwing the above error: > ---- > } else if (testBeginTimeout < currentTimeMillis) { > double elapsed = (currentTimeMillis - testBeginTime) / 1000.0; > throw new TimeoutException( > "The browser did not contact the server within " > + TEST_BEGIN_TIMEOUT_MILLIS + "ms.\n" > + messageQueue.getUnretrievedClients(currentTestInfo) > + "\n Actual time elapsed: " + elapsed + " seconds.\n"); > } > ---- > > I don't understand well how the testing with server/client concept > works. > Why is this timeout generated and how can I solve this? > Shouldn't the timeout be adjustable as I the timeout is contained in > the constant TEST_BEGIN_TIMEOUT_MILLIS ? > > -- > http://groups.google.com/group/Google-Web-Toolkit-Contributors > -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
