Skip to content

Commit

Permalink
Grid: Found a better place to convert seconds to milliseconds
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Jan 25, 2016
1 parent f362d77 commit bc16ffa
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ private void loadFromCommandLine(String[] args) {
configuration.put(CLEAN_UP_CYCLE, Integer.parseInt(helper.getParamValue("-cleanUpCycle")));
}
if (helper.isParamPresent("-timeout")) {
configuration.put(TIME_OUT, Integer.parseInt(helper.getParamValue("-timeout")));
configuration.put(TIME_OUT, Integer.parseInt(helper.getParamValue("-timeout")) * 1000);
}
if (helper.isParamPresent("-browserTimeout")) {
configuration.put(BROWSER_TIME_OUT, Integer.parseInt(helper.getParamValue("-browserTimeout")));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public BaseRemoteProxy(RegistrationRequest request, Registry registry) {

maxConcurrentSession = getConfigInteger(RegistrationRequest.MAX_SESSION);
cleanUpCycle = getConfigInteger(RegistrationRequest.CLEAN_UP_CYCLE);
timeOutMs = getConfigInteger(RegistrationRequest.TIME_OUT) * 1000;
timeOutMs = getConfigInteger(RegistrationRequest.TIME_OUT);
statusCheckTimeout = getConfigInteger(RegistrationRequest.STATUS_CHECK_TIMEOUT);

List<DesiredCapabilities> capabilities = request.getCapabilities();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1022,8 +1022,6 @@ public static RemoteControlConfiguration parseLauncherOptions(String[] args) {
configuration.setDebugURL(getArg(args, ++i));
} else if ("-timeout".equalsIgnoreCase(arg)) {
configuration.setTimeoutInSeconds(Integer.parseInt(getArg(args, ++i)));
} else if ("-browserTimeout".equalsIgnoreCase(arg)) {
configuration.setBrowserTimeoutInMs(Integer.parseInt(getArg(args, ++i)));
} else if ("-jettyThreads".equalsIgnoreCase(arg)) {
int jettyThreadsCount = Integer.parseInt(getArg(args, ++i));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public void timeouts() {
RegistrationRequest req = RegistrationRequest.build("-role", "webdriver","-"+RegistrationRequest.REMOTE_HOST, remoteHost,"-"+RegistrationRequest.ID, "abc", "-timeout", "23", "-browserTimeout", "12","-host","localhost");
req.getConfiguration().put(RegistrationRequest.PROXY_CLASS, null);
RemoteProxy p = BaseRemoteProxy.getNewInstance(req, registry);
assertEquals(23, p.getTimeOut());
assertEquals(23000, p.getTimeOut());
}


Expand Down

0 comments on commit bc16ffa

Please sign in to comment.