lastModule = currentModule;
if (testMethodTimeout == 0) {
testMethodTimeout = currentTimeMillis + testBatchingMethodTimeoutMillis;
} else if (testMethodTimeout < currentTimeMillis) {
double elapsed = (currentTimeMillis - testBeginTime) / 1000.0;
throw new TimeoutException(
"The browser did not complete the test method "
+ currentTestInfo.toString() + " in "
+ testBatchingMethodTimeoutMillis
+ "ms.\n We have no results from:\n"
+ messageQueue.getWorkingClients(currentTestInfo)
+ "Actual time elapsed: " + elapsed + " seconds.\n"
+ "Try increasing this timeout using the '-testMethodTimeout minutes' option\n");
}
} else if (testBeginTimeout < currentTimeMillis) {
double elapsed = (currentTimeMillis - testBeginTime) / 1000.0;
throw new TimeoutException(
"The browser did not contact the server within "
+ baseTestBeginTimeoutMillis + "ms.\n"
+ messageQueue.getUnretrievedClients(currentTestInfo)
+ "\n Actual time elapsed: " + elapsed + " seconds.\n"
+ "Try increasing this timeout using the '-testBeginTimeout minutes' option\n"
+ "The default value of minutes is 1, i.e., the server waits 1 minute or 60 seconds.\n");
}
// Check that we haven't lost communication with a remote host.
String[] interruptedHosts = runStyle.getInterruptedHosts();
if (interruptedHosts != null) {
StringBuilder msg = new StringBuilder();
msg.append("A remote browser died a mysterious death.\n");
msg.append(" We lost communication with:");
for (String host : interruptedHosts) {
msg.append("\n ").append(host);
}
throw new TimeoutException(msg.toString());
}
if (messageQueue.hasResults(currentTestInfo)) {
return false;
} else if (pendingException == null) {