From 3e721c57dbb4951f38e70aae5385915c68dcb256 Mon Sep 17 00:00:00 2001 From: Frank Chen Date: Fri, 3 Jul 2026 10:13:17 -0700 Subject: [PATCH 1/2] fix: configure slow branch test mock --- .../aws-durable-execution-sdk-python/tests/concurrency_test.py | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/aws-durable-execution-sdk-python/tests/concurrency_test.py b/packages/aws-durable-execution-sdk-python/tests/concurrency_test.py index d3de5a1e..8796343c 100644 --- a/packages/aws-durable-execution-sdk-python/tests/concurrency_test.py +++ b/packages/aws-durable-execution-sdk-python/tests/concurrency_test.py @@ -3292,6 +3292,7 @@ def slow_func(): execution_state = Mock() execution_state.create_checkpoint = Mock() + execution_state.wrap_user_function = lambda func, *args, **kwargs: func executor_context = Mock() executor_context._create_step_id_for_logical_step = lambda idx: f"step_{idx}" # noqa: SLF001 executor_context._parent_id = "parent" # noqa: SLF001 From 29173e6374756faa8a402536f1fb0718722fdb8d Mon Sep 17 00:00:00 2001 From: Frank Chen Date: Fri, 3 Jul 2026 10:15:12 -0700 Subject: [PATCH 2/2] test: relax min successful map assertion --- .../test/map/test_map_with_min_successful.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/aws-durable-execution-sdk-python-examples/test/map/test_map_with_min_successful.py b/packages/aws-durable-execution-sdk-python-examples/test/map/test_map_with_min_successful.py index c3a21772..33412455 100644 --- a/packages/aws-durable-execution-sdk-python-examples/test/map/test_map_with_min_successful.py +++ b/packages/aws-durable-execution-sdk-python-examples/test/map/test_map_with_min_successful.py @@ -64,7 +64,8 @@ def test_map_with_min_successful(durable_runner): op for op in map_op.child_operations if op.status is OperationStatus.STARTED ] - # Should have 6-7 successes, 0 failures, and remaining in STARTED state - assert len(succeeded) == result_data["success_count"] + # The operation tree may observe one already-running child completing after + # the BatchResult snapshot used by the handler response. + assert result_data["success_count"] <= len(succeeded) <= 7 assert len(failed) == 0 - assert len(started) == 10 - result_data["success_count"] + assert len(started) == 10 - len(succeeded)