Skip to content

Commit 753bf54

Browse files
committed
fix test cases for nesting mode
1 parent 28df24b commit 753bf54

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

sdk-integration-tests/src/test/java/software/amazon/lambda/durable/ParallelIntegrationTest.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1151,6 +1151,12 @@ void testParallelWithFirstSuccessful_earlyTermination(NestingType nestingType, i
11511151

11521152
var result = runner.runUntilComplete("test");
11531153
assertEquals(ExecutionStatus.SUCCEEDED, result.getStatus());
1154-
assertEquals(events, result.getHistoryEvents().size());
1154+
if (nestingType == NestingType.FLAT) {
1155+
assertEquals(2, result.getHistoryEvents().size());
1156+
} else {
1157+
// might 4 if only 1 branch completed and at most 8 if all branches completed
1158+
assertTrue(4 <= result.getHistoryEvents().size());
1159+
assertTrue(result.getHistoryEvents().size() <= events);
1160+
}
11551161
}
11561162
}

0 commit comments

Comments
 (0)