/** * Creates a new {@link GridRegistry} and starts it. * * @param hub the {@link Hub} to associate this registry with * @param proxySet the {@link ProxySet} to manage proxies with */ public ZaleniumRegistry(Hub hub, ProxySet proxySet) { super(hub); this.newSessionQueue = new NewSessionRequestQueue(); proxies = proxySet; this.matcherThread.setUncaughtExceptionHandler(new UncaughtExceptionHandler()); }
public ZaleniumRegistry(Hub hub) { super(hub); this.newSessionQueue = new NewSessionRequestQueue(); long minContainers = ZaleniumConfiguration.getDesiredContainersOnStartup(); long maxContainers = ZaleniumConfiguration.getMaxDockerSeleniumContainers(); long timeToWaitToStart = ZaleniumConfiguration.getTimeToWaitToStart(); boolean waitForAvailableNodes = ZaleniumConfiguration.isWaitForAvailableNodes(); int maxTimesToProcessRequest = ZaleniumConfiguration.getMaxTimesToProcessRequest(); int checkContainersInterval = ZaleniumConfiguration.getCheckContainersInterval(); DockeredSeleniumStarter starter = new DockeredSeleniumStarter(); AutoStartProxySet autoStart = new AutoStartProxySet(false, minContainers, maxContainers, timeToWaitToStart, waitForAvailableNodes, starter, Clock.systemDefaultZone(), maxTimesToProcessRequest, checkContainersInterval); proxies = autoStart; this.matcherThread.setUncaughtExceptionHandler(new UncaughtExceptionHandler()); new TestSessionCollectorExports(proxies).register(); new ContainerStatusCollectorExports(autoStart.getStartedContainers()).register(); }