assertFalse("Expected sessionId, got failed", "FAILED".equals(sessionIdTwo));
}
public void testQueueingSingleThreadedTimeoutForceUnlock() throws Exception {
String browserId = "foo";
MockTime time = new MockTime(System.currentTimeMillis());
SlaveBrowser browser =
new SlaveBrowser(time, browserId, new BrowserInfo(), 10000, new NullPathPrefix(), "quirks",
RunnerType.CLIENT, BrowserState.READY, new Instant(0));
CapturedBrowsers capturedBrowsers = new CapturedBrowsers(new BrowserIdStrategy(time));
capturedBrowsers.addSlave(browser);
String sessionIdOne = doRequest(browserId, null, "start", capturedBrowsers, time);
assertNotNull("Expected the response to be not null.", sessionIdOne);
assertFalse("Expected sessionId, got failed", "FAILED".equals(sessionIdOne));
String failed = doRequest(browserId, null, "start", capturedBrowsers, time);
assertTrue("Expected to be failed, but got:" + failed, "FAILED".equals(failed));
time.add(SlaveBrowser.SESSION_TIMEOUT + 2);
String sessionIdTwo = doRequest(browserId, null, "start", capturedBrowsers, time);
assertNotNull("Expected the response to be not null.", sessionIdTwo);
assertFalse("Expected sessionId, got failed", "FAILED".equals(sessionIdTwo));
}