Skip to content

Commit

Permalink
Changed some timeouts to be seconds instead of msecs
Browse files Browse the repository at this point in the history
  • Loading branch information
S1artie committed Jun 9, 2017
1 parent 2ff48ce commit 098c1a6
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ protected int getForkPauseWaitInterval() {
/**
* The default time to wait for a fork to become ready for execution.
*/
protected static final int FORK_WAIT_UNTIL_READY_TIMEOUT_DEFAULT = (int) TimeUnit.MINUTES.toMillis(5);
protected static final int FORK_WAIT_UNTIL_READY_TIMEOUT_DEFAULT = (int) TimeUnit.MINUTES.toSeconds(5);

/**
* Returns the time to wait for a fork to become ready for execution.
Expand All @@ -461,7 +461,7 @@ protected int getForkWaitUntilReadyTimeoutDefault() {
/**
* The default time to wait for child processes to be killed.
*/
protected static final int CHILD_PROCESS_KILL_TIMEOUT_DEFAULT = 60000;
protected static final int CHILD_PROCESS_KILL_TIMEOUT_DEFAULT = 60;

protected int getChildProcessKillTimeout() {
return System.getProperty(CHILD_PROCESS_KILL_TIMEOUT_PROPERTY) != null
Expand Down Expand Up @@ -634,7 +634,7 @@ protected SuiteSummaryResult run(final Suite aRootSuiteCall, VariantDefinition a

@Override
public void run() {
processTerminator.killAndWait(getChildProcessKillTimeout());
processTerminator.killAndWait((int) TimeUnit.SECONDS.toMillis(getChildProcessKillTimeout()));
}
});

Expand Down Expand Up @@ -714,7 +714,7 @@ public void run() throws InterruptedException {
if (remotingServer != null) {
remotingServer.closeAll(true);
}
processTerminator.killAndWait(getChildProcessKillTimeout());
processTerminator.killAndWait((int) TimeUnit.SECONDS.toMillis(getChildProcessKillTimeout()));
}
}

Expand Down Expand Up @@ -2819,8 +2819,7 @@ public Boolean run() {
// nothing to do here
}

if (System.nanoTime() - tempWaitStartTime > TimeUnit.MILLISECONDS
.toNanos(tempWaitTimeout)) {
if (System.nanoTime() - tempWaitStartTime > TimeUnit.SECONDS.toNanos(tempWaitTimeout)) {
System.err.println("TIMED OUT WHILE WAITING FOR FORK TO GET READY");
return false;
}
Expand Down

0 comments on commit 098c1a6

Please sign in to comment.