55
66import pytest
77
8- from aws_durable_execution_sdk_python .config import CallbackConfig
8+ from aws_durable_execution_sdk_python .config import CallbackConfig , WaitForCallbackConfig
99from aws_durable_execution_sdk_python .exceptions import FatalError
1010from aws_durable_execution_sdk_python .identifier import OperationIdentifier
1111from aws_durable_execution_sdk_python .lambda_service import (
@@ -269,7 +269,7 @@ def test_wait_for_callback_handler_with_name_and_config():
269269 mock_callback .result .return_value = "named_callback_result"
270270 mock_context .create_callback .return_value = mock_callback
271271 mock_submitter = Mock ()
272- config = CallbackConfig ()
272+ config = WaitForCallbackConfig ()
273273
274274 result = wait_for_callback_handler (
275275 mock_context , mock_submitter , "test_callback" , config
@@ -291,7 +291,7 @@ def test_wait_for_callback_handler_submitter_called_with_callback_id():
291291 mock_context .create_callback .return_value = mock_callback
292292 mock_submitter = Mock ()
293293
294- def capture_step_call (func , name ):
294+ def capture_step_call (func , name , config = None ):
295295 # Execute the step callable to verify submitter is called correctly
296296 step_context = Mock (spec = StepContext )
297297 func (step_context )
@@ -357,7 +357,7 @@ def test_wait_for_callback_handler_with_none_callback_id():
357357 mock_context .create_callback .return_value = mock_callback
358358 mock_submitter = Mock ()
359359
360- def execute_step (func , name ):
360+ def execute_step (func , name , config = None ):
361361 step_context = Mock (spec = StepContext )
362362 return func (step_context )
363363
@@ -378,7 +378,7 @@ def test_wait_for_callback_handler_with_empty_string_callback_id():
378378 mock_context .create_callback .return_value = mock_callback
379379 mock_submitter = Mock ()
380380
381- def execute_step (func , name ):
381+ def execute_step (func , name , config = None ):
382382 step_context = Mock (spec = StepContext )
383383 return func (step_context )
384384
@@ -591,7 +591,7 @@ def failing_submitter(callback_id):
591591 msg = "Submitter failed"
592592 raise ValueError (msg )
593593
594- def step_side_effect (func , name ):
594+ def step_side_effect (func , name , config = None ):
595595 step_context = Mock (spec = StepContext )
596596 func (step_context )
597597
@@ -675,7 +675,7 @@ def test_wait_for_callback_handler_config_propagation():
675675 mock_context .create_callback .return_value = mock_callback
676676 mock_submitter = Mock ()
677677
678- config = CallbackConfig (timeout_seconds = 120 , heartbeat_timeout_seconds = 30 )
678+ config = WaitForCallbackConfig (timeout_seconds = 120 , heartbeat_timeout_seconds = 30 )
679679
680680 result = wait_for_callback_handler (
681681 mock_context , mock_submitter , "config_test" , config
@@ -729,7 +729,7 @@ def test_callback_lifecycle_complete_flow():
729729 mock_callback .result .return_value = {"status" : "completed" , "data" : "test_data" }
730730 mock_context .create_callback .return_value = mock_callback
731731
732- config = CallbackConfig (timeout_seconds = 300 , heartbeat_timeout_seconds = 60 )
732+ config = WaitForCallbackConfig (timeout_seconds = 300 , heartbeat_timeout_seconds = 60 )
733733 callback_id = create_callback_handler (
734734 state = mock_state ,
735735 operation_identifier = OperationIdentifier ("lifecycle_callback" , None ),
@@ -742,7 +742,7 @@ def mock_submitter(cb_id):
742742 assert cb_id == "lifecycle_cb123"
743743 return "submitted"
744744
745- def execute_step (func , name ):
745+ def execute_step (func , name , config = None ):
746746 step_context = Mock (spec = StepContext )
747747 return func (step_context )
748748
0 commit comments