Skip to content

Commit

Permalink
[SCB-948] only wait for start complete for 1 minute
Browse files Browse the repository at this point in the history
  • Loading branch information
wujimin committed Oct 12, 2018
1 parent 31b9925 commit 32a1eb5
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,17 @@ public void waitStartComplete() {
}

LOGGER.info("waiting {} start.", displayName);
long startTime = System.currentTimeMillis();
for (; ; ) {
if (startCompleted) {
LOGGER.info("{} start completed.", displayName);
return;
}

if (System.currentTimeMillis() - startTime > TimeUnit.MINUTES.toMillis(1)) {
throw new IllegalStateException(String.format("[%s] timeout to wait for start complete.", displayName));
}

ITUtils.forceWait(TimeUnit.MILLISECONDS, 500);
}
}
Expand Down

0 comments on commit 32a1eb5

Please sign in to comment.