@@ -1196,6 +1196,7 @@ def test_wait_for_callback_basic(mock_executor_class):
11961196 # Verify the child context callable
11971197 call_args = mock_run_in_child .call_args
11981198 assert call_args [0 ][1 ] is None # name should be None
1199+ assert call_args [0 ][2 ].sub_type is OperationSubType .WAIT_FOR_CALLBACK
11991200
12001201
12011202@patch ("aws_durable_execution_sdk_python.context.wait_for_callback_handler" )
@@ -1225,6 +1226,7 @@ def test_wait_for_callback_with_name_and_config(mock_executor_class):
12251226 assert (
12261227 call_args [0 ][1 ] == "submit_function"
12271228 ) # name should be from _original_name
1229+ assert call_args [0 ][2 ].sub_type is OperationSubType .WAIT_FOR_CALLBACK
12281230
12291231
12301232@patch ("aws_durable_execution_sdk_python.context.wait_for_callback_handler" )
@@ -1250,6 +1252,7 @@ def test_wait_for_callback_resolves_name_from_submitter(mock_executor_class):
12501252
12511253 call_args = mock_run_in_child .call_args
12521254 assert call_args [0 ][1 ] == "submit_task"
1255+ assert call_args [0 ][2 ].sub_type is OperationSubType .WAIT_FOR_CALLBACK
12531256
12541257
12551258@patch ("aws_durable_execution_sdk_python.context.wait_for_callback_handler" )
@@ -1270,8 +1273,9 @@ def capture_handler_call(context, submitter, name, config):
12701273
12711274 with patch .object (DurableContext , "run_in_child_context" ) as mock_run_in_child :
12721275
1273- def run_child_context (callable_func , name ):
1276+ def run_child_context (callable_func , name , config ):
12741277 # Execute the child context callable
1278+ assert config .sub_type is OperationSubType .WAIT_FOR_CALLBACK
12751279 child_context = create_test_context (state = mock_state , parent_id = "test" )
12761280 return callable_func (child_context )
12771281
0 commit comments