From af002d48473b13ce554005b6c575af7f7f2b0914 Mon Sep 17 00:00:00 2001 From: Adrian Sutton Date: Fri, 3 May 2019 07:45:50 +1000 Subject: [PATCH] Wait for next message to be sent in FullSyncChainDownloaderTest. (#1394) Signed-off-by: Adrian Sutton --- .../ethereum/eth/sync/fullsync/FullSyncChainDownloaderTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/fullsync/FullSyncChainDownloaderTest.java b/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/fullsync/FullSyncChainDownloaderTest.java index 7318a456ce..43a35f2fca 100644 --- a/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/fullsync/FullSyncChainDownloaderTest.java +++ b/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/fullsync/FullSyncChainDownloaderTest.java @@ -317,6 +317,8 @@ public class FullSyncChainDownloaderTest { assertThat(syncState.syncTarget().get().peer()).isEqualTo(bestPeer.getEthPeer()); // The next message should be for checkpoint headers from the sync target + Awaitility.waitAtMost(10, TimeUnit.SECONDS) + .until(() -> bestPeer.peekNextOutgoingRequest().isPresent()); final Optional maybeNextMessage = bestPeer.peekNextOutgoingRequest(); assertThat(maybeNextMessage).isPresent(); final MessageData nextMessage = maybeNextMessage.get();