JAMES-2553 StartAction is more a runnable in JamesServerWithRetryConnectionTest
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/6bfbc8ed Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/6bfbc8ed Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/6bfbc8ed Branch: refs/heads/master Commit: 6bfbc8ed464d4900d6c5650d1efc34c9c6740e23 Parents: 2b17c92 Author: Benoit Tellier <[email protected]> Authored: Thu Oct 4 09:53:32 2018 +0700 Committer: Benoit Tellier <[email protected]> Committed: Thu Oct 4 17:48:43 2018 +0700 ---------------------------------------------------------------------- .../org/apache/james/JamesServerWithRetryConnectionTest.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/james-project/blob/6bfbc8ed/server/container/guice/cassandra-guice/src/test/java/org/apache/james/JamesServerWithRetryConnectionTest.java ---------------------------------------------------------------------- diff --git a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/JamesServerWithRetryConnectionTest.java b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/JamesServerWithRetryConnectionTest.java index d7c8cde..a9e3c52 100644 --- a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/JamesServerWithRetryConnectionTest.java +++ b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/JamesServerWithRetryConnectionTest.java @@ -138,19 +138,15 @@ class JamesServerWithRetryConnectionTest { assertThatServerStartCorrectly(server); } - - interface StartAction { - void execute(); - } - private void waitToStartContainer(long waitingTime, StartAction action) { + private void waitToStartContainer(long waitingTime, Runnable action) { executorService.submit(() -> { try { Thread.sleep(waitingTime); } catch (InterruptedException e) { throw new RuntimeException(e); } - action.execute(); + action.run(); }); } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
