Skip to content

Commit d870b2d

Browse files
committed
fix: update unit tests asserting seconds for WaitOptions
1 parent 4acb0f8 commit d870b2d

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

tests/e2e/execution_int_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ def mock_checkpoint(
306306
assert second_checkpoint.operation_type is OperationType.WAIT
307307
assert second_checkpoint.action is OperationAction.START
308308
assert second_checkpoint.operation_id == "1-1"
309-
assert second_checkpoint.wait_options.seconds == 1
309+
assert second_checkpoint.wait_options.wait_seconds == 1
310310

311311
mock_inside_child.assert_called_once_with(10, 20)
312312

@@ -391,7 +391,7 @@ def mock_checkpoint(
391391
assert checkpoint.operation_type is OperationType.WAIT
392392
assert checkpoint.action is OperationAction.START
393393
assert checkpoint.operation_id == "1"
394-
assert checkpoint.wait_options.seconds == 1
394+
assert checkpoint.wait_options.wait_seconds == 1
395395

396396

397397
def test_lambda_client_initialization():

tests/lambda_service_test.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ def test_step_options_to_dict():
315315

316316
def test_wait_options_to_dict():
317317
"""Test WaitOptions.to_dict method."""
318-
options = WaitOptions(seconds=60)
318+
options = WaitOptions(wait_seconds=60)
319319
result = options.to_dict()
320320
assert result == {"WaitSeconds": 60}
321321

@@ -394,7 +394,7 @@ def test_operation_update_to_dict_complete():
394394
message="Test error", type="TestError", data=None, stack_trace=None
395395
)
396396
step_options = StepOptions(next_attempt_delay_seconds=30)
397-
wait_options = WaitOptions(seconds=60)
397+
wait_options = WaitOptions(wait_seconds=60)
398398
callback_options = CallbackOptions(
399399
timeout_seconds=300, heartbeat_timeout_seconds=60
400400
)
@@ -463,7 +463,7 @@ def test_operation_update_create_callback():
463463

464464
def test_operation_update_create_wait_start():
465465
"""Test OperationUpdate.create_wait_start factory method."""
466-
wait_options = WaitOptions(seconds=30)
466+
wait_options = WaitOptions(wait_seconds=30)
467467
update = OperationUpdate.create_wait_start(
468468
OperationIdentifier("wait1", "parent1", "test_wait"), wait_options
469469
)
@@ -581,7 +581,7 @@ def test_operation_update_with_parent_id():
581581
def test_operation_update_wait_and_invoke_types():
582582
"""Test OperationUpdate with WAIT and INVOKE operation types."""
583583
# Test WAIT operation
584-
wait_options = WaitOptions(seconds=30)
584+
wait_options = WaitOptions(wait_seconds=30)
585585
wait_update = OperationUpdate(
586586
operation_id="wait_op",
587587
operation_type=OperationType.WAIT,
@@ -1064,7 +1064,7 @@ def test_durable_service_client_protocol_stop():
10641064

10651065
def test_operation_update_create_wait():
10661066
"""Test OperationUpdate factory method for WAIT operations."""
1067-
wait_options = WaitOptions(seconds=30)
1067+
wait_options = WaitOptions(wait_seconds=30)
10681068
update = OperationUpdate(
10691069
operation_id="wait1",
10701070
operation_type=OperationType.WAIT,
@@ -1369,7 +1369,7 @@ def test_operation_update_complete_with_new_fields():
13691369
)
13701370
context_options = ContextOptions(replay_children=True)
13711371
step_options = StepOptions(next_attempt_delay_seconds=30)
1372-
wait_options = WaitOptions(seconds=60)
1372+
wait_options = WaitOptions(wait_seconds=60)
13731373
callback_options = CallbackOptions(
13741374
timeout_seconds=300, heartbeat_timeout_seconds=60
13751375
)

tests/operation/wait_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def test_wait_handler_not_completed():
5757
operation_type=OperationType.WAIT,
5858
action=OperationAction.START,
5959
sub_type=OperationSubType.WAIT,
60-
wait_options=WaitOptions(seconds=30),
60+
wait_options=WaitOptions(wait_seconds=30),
6161
)
6262
mock_state.create_checkpoint.assert_called_once_with(
6363
operation_update=expected_operation
@@ -85,7 +85,7 @@ def test_wait_handler_with_none_name():
8585
operation_type=OperationType.WAIT,
8686
action=OperationAction.START,
8787
sub_type=OperationSubType.WAIT,
88-
wait_options=WaitOptions(seconds=5),
88+
wait_options=WaitOptions(wait_seconds=5),
8989
)
9090
mock_state.create_checkpoint.assert_called_once_with(
9191
operation_update=expected_operation

0 commit comments

Comments
 (0)