mirror of
https://github.com/floci-io/floci.git
synced 2026-12-02 01:43:02 -05:00
test(codepipeline): wait for rollback terminal events (#6300)
Wait for asynchronous terminal event delivery before checking the exact event sequence. Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
This commit is contained in:
1 parent
201ce60b61
commit
9eaa4404a4
1 file changed
+4
-1
+4
-1
@@ -32,6 +32,7 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import static org.awaitility.Awaitility.await;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
@@ -315,7 +316,9 @@ class CodePipelineRetryRollbackTest {
|
||||
REGION, ACCOUNT).path("pipelineExecutionId").asText();
|
||||
awaitStatus("started-event", rollbackId, "Succeeded");
|
||||
|
||||
assertEquals(List.of("STARTED", "SUCCEEDED"), pipelineStates(eventBridge, rollbackId));
|
||||
// The terminal status becomes visible before the runner publishes its final event.
|
||||
await().atMost(10, TimeUnit.SECONDS).untilAsserted(() ->
|
||||
assertEquals(List.of("STARTED", "SUCCEEDED"), pipelineStates(eventBridge, rollbackId)));
|
||||
}
|
||||
|
||||
// Catches: a rollback whose scheduling is rejected leaving the STARTED event without a FAILED one.
|
||||
|
||||
Reference in new issue
Block a user