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");
}
} 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");
}
// 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) {