use of org.openqa.grid.internal.TestSlot in project zalenium by zalando.
the class DockerSeleniumRemoteProxy method terminateIdleTest.
/*
Method to terminate an idle session via the registry, the code works because each one has only one slot
We use BROWSER_TIMEOUT as a reason, but this could be changed in the future to show a more clear reason
*/
@VisibleForTesting
protected synchronized void terminateIdleTest() {
for (TestSlot testSlot : getTestSlots()) {
if (testSlot.getSession() != null) {
long executionTime = (System.currentTimeMillis() - testSlot.getLastSessionStart()) / 1000;
ga.testEvent(DockerSeleniumRemoteProxy.class.getName(), testSlot.getSession().getRequestedCapabilities().toString(), executionTime);
getRegistry().forceRelease(testSlot, SessionTerminationReason.ORPHAN);
}
}
}
Aggregations