Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -448,8 +448,12 @@ private UUID runAndCancel(CountDownLatch cancelLatch, int cancelDelay) throws Ex

assertRunningStatus(runUuid);

// stop dynamic simulation
cancelLatch.await();
// stop dynamic simulation, need a timeout to avoid test hangs if an exception occurs before latch countdown
boolean completed = cancelLatch.await(5, TimeUnit.SECONDS);
if (!completed) {
throw new AssertionError("Timed out waiting for cancelLatch, something might have crashed before latch countdown happens.");
}

// custom additional wait
await().pollDelay(cancelDelay, TimeUnit.MILLISECONDS).until(() -> true);

Expand Down