@Test public void shouldRefreshTimeout() throws InterruptedException { Thread.sleep(100); long inactivityTime = activeSession.getInactivityTime(); Thread.sleep(100); seleniumSessions.refreshTimeout("sessionId"); long inactivityTimeAfterRefresh = activeSession.getInactivityTime(); assertTrue(String.format("Inactivity time should be less after refresh, but have %d > %d", inactivityTime, inactivityTimeAfterRefresh), inactivityTime > inactivityTimeAfterRefresh); }
public void refreshTimeout(String sessionId) { for (TestSession activeSession : registry.getActiveSessions()) { if ((activeSession != null) && (sessionId != null) && (activeSession.getExternalKey() != null)) { if (sessionId.equals(activeSession.getExternalKey().getKey())) { refreshTimeout(activeSession); } } } }
SeleniumSessions { public void refreshTimeout(String sessionId) { for (TestSession activeSession : registry.getActiveSessions()) { if ((activeSession != null) && (sessionId != null) && (activeSession.getExternalKey() != null)) { if (sessionId.equals(activeSession.getExternalKey().getKey())) { refreshTimeout(activeSession); } } } } }
SeleniumSessions { public void refreshTimeout(String sessionId) { for (TestSession activeSession : registry.getActiveSessions()) { if ((activeSession != null) && (sessionId != null) && (activeSession.getExternalKey() != null)) { if (sessionId.equals(activeSession.getExternalKey().getKey())) { refreshTimeout(activeSession); } } } } SeleniumSessions(GridRegistry registry); }
SeleniumSessions { public void refreshTimeout(String sessionId) { for (TestSession activeSession : registry.getActiveSessions()) { if ((activeSession != null) && (sessionId != null) && (activeSession.getExternalKey() != null)) { if (sessionId.equals(activeSession.getExternalKey().getKey())) { refreshTimeout(activeSession); } } } } SeleniumSessions(GridRegistry registry); URL getRemoteHostForSession(String sessionId); void refreshTimeout(String sessionId); static String getSessionIdFromPath(String pathInfo); static String trimSessionPath(String pathInfo); }
SeleniumSessions { public void refreshTimeout(String sessionId) { for (TestSession activeSession : registry.getActiveSessions()) { if ((activeSession != null) && (sessionId != null) && (activeSession.getExternalKey() != null)) { if (sessionId.equals(activeSession.getExternalKey().getKey())) { refreshTimeout(activeSession); } } } } SeleniumSessions(GridRegistry registry); URL getRemoteHostForSession(String sessionId); void refreshTimeout(String sessionId); static String getSessionIdFromPath(String pathInfo); static String trimSessionPath(String pathInfo);  }