Skip to content

Commit bc16ffa

Browse files
committed
Grid: Found a better place to convert seconds to milliseconds
1 parent f362d77 commit bc16ffa

File tree

4 files changed

+3
-5
lines changed

4 files changed

+3
-5
lines changed

java/server/src/org/openqa/grid/common/RegistrationRequest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ private void loadFromCommandLine(String[] args) {
465465
configuration.put(CLEAN_UP_CYCLE, Integer.parseInt(helper.getParamValue("-cleanUpCycle")));
466466
}
467467
if (helper.isParamPresent("-timeout")) {
468-
configuration.put(TIME_OUT, Integer.parseInt(helper.getParamValue("-timeout")));
468+
configuration.put(TIME_OUT, Integer.parseInt(helper.getParamValue("-timeout")) * 1000);
469469
}
470470
if (helper.isParamPresent("-browserTimeout")) {
471471
configuration.put(BROWSER_TIME_OUT, Integer.parseInt(helper.getParamValue("-browserTimeout")));

java/server/src/org/openqa/grid/internal/BaseRemoteProxy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public BaseRemoteProxy(RegistrationRequest request, Registry registry) {
144144

145145
maxConcurrentSession = getConfigInteger(RegistrationRequest.MAX_SESSION);
146146
cleanUpCycle = getConfigInteger(RegistrationRequest.CLEAN_UP_CYCLE);
147-
timeOutMs = getConfigInteger(RegistrationRequest.TIME_OUT) * 1000;
147+
timeOutMs = getConfigInteger(RegistrationRequest.TIME_OUT);
148148
statusCheckTimeout = getConfigInteger(RegistrationRequest.STATUS_CHECK_TIMEOUT);
149149

150150
List<DesiredCapabilities> capabilities = request.getCapabilities();

java/server/src/org/openqa/selenium/server/SeleniumServer.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,8 +1022,6 @@ public static RemoteControlConfiguration parseLauncherOptions(String[] args) {
10221022
configuration.setDebugURL(getArg(args, ++i));
10231023
} else if ("-timeout".equalsIgnoreCase(arg)) {
10241024
configuration.setTimeoutInSeconds(Integer.parseInt(getArg(args, ++i)));
1025-
} else if ("-browserTimeout".equalsIgnoreCase(arg)) {
1026-
configuration.setBrowserTimeoutInMs(Integer.parseInt(getArg(args, ++i)));
10271025
} else if ("-jettyThreads".equalsIgnoreCase(arg)) {
10281026
int jettyThreadsCount = Integer.parseInt(getArg(args, ++i));
10291027

java/server/test/org/openqa/grid/internal/BaseRemoteProxyTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public void timeouts() {
147147
RegistrationRequest req = RegistrationRequest.build("-role", "webdriver","-"+RegistrationRequest.REMOTE_HOST, remoteHost,"-"+RegistrationRequest.ID, "abc", "-timeout", "23", "-browserTimeout", "12","-host","localhost");
148148
req.getConfiguration().put(RegistrationRequest.PROXY_CLASS, null);
149149
RemoteProxy p = BaseRemoteProxy.getNewInstance(req, registry);
150-
assertEquals(23, p.getTimeOut());
150+
assertEquals(23000, p.getTimeOut());
151151
}
152152

153153

0 commit comments

Comments
 (0)