Skip to content

Commit

Permalink
JAMES-2553 StartAction is more a runnable in JamesServerWithRetryConn…
Browse files Browse the repository at this point in the history
…ectionTest
  • Loading branch information
chibenwa committed Oct 4, 2018
1 parent 2b17c92 commit 6bfbc8e
Showing 1 changed file with 2 additions and 6 deletions.
Expand Up @@ -138,19 +138,15 @@ void serverShouldRetryToConnectToElasticSearchWhenStartService(GuiceJamesServer


assertThatServerStartCorrectly(server); assertThatServerStartCorrectly(server);
} }

interface StartAction {
void execute();
}


private void waitToStartContainer(long waitingTime, StartAction action) { private void waitToStartContainer(long waitingTime, Runnable action) {
executorService.submit(() -> { executorService.submit(() -> {
try { try {
Thread.sleep(waitingTime); Thread.sleep(waitingTime);
} catch (InterruptedException e) { } catch (InterruptedException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
action.execute(); action.run();
}); });
} }


Expand Down

0 comments on commit 6bfbc8e

Please sign in to comment.