coordinator: fix BlockCreationMonitorTest flacky test (#624)

* coordinator: fix BlockCreationMonitorTest flacky test

* coordinator: fix BlockCreationMonitorTest flacky test
This commit is contained in:
Pedro Novais
2025-01-29 16:32:30 +00:00
committed by GitHub
parent 317ef4f06e
commit 8c7c9ebd9c

View File

@@ -253,12 +253,12 @@ class BlockCreationMonitorTest {
assertThat(blockCreationListener.blocksReceived).isNotEmpty
assertThat(blockCreationListener.blocksReceived.last().number).isGreaterThanOrEqualTo(103u)
}
fakeL2RpcNode.stopHttpServer()
fakeL2RpcNode.stopHttpServer().get()
val lastBlockReceived = blockCreationListener.blocksReceived.last().number
// Wait for a while to make sure no more blocks are fetched
await().atLeast(config.pollingInterval.times(2).toJavaDuration())
fakeL2RpcNode.resumeHttpServer()
fakeL2RpcNode.resumeHttpServer().get()
await()
.atMost(40.seconds.toJavaDuration())
.untilAsserted {