Skip to content

Commit cc8c4f8

Browse files
committed
chore: add test for run_concurrent not being called in the non mc path
1 parent d2b14c0 commit cc8c4f8

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/test_main.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@
99

1010

1111
class TestMain(unittest.TestCase):
12+
@patch("awslambdaric.lambda_multi_concurrent_utils.MultiConcurrentRunner")
1213
@patch("awslambdaric.__main__.bootstrap")
1314
@patch("awslambdaric.__main__.LambdaRuntimeClient")
1415
@patch("awslambdaric.__main__.LambdaConfigProvider")
1516
def test_default_path_invokes_runtime_client_and_bootstrap(
16-
self, mock_config_provider, mock_client_cls, mock_bootstrap
17+
self, mock_config_provider, mock_client_cls, mock_bootstrap, mock_runner
1718
):
1819
# Non-multi-concurrent mode
1920
cfg = MagicMock()
@@ -30,6 +31,8 @@ def test_default_path_invokes_runtime_client_and_bootstrap(
3031
"my.handler", mock_client_cls.return_value
3132
)
3233

34+
mock_runner.run_concurrent.assert_not_called()
35+
3336
@patch("awslambdaric.lambda_multi_concurrent_utils.MultiConcurrentRunner")
3437
@patch("awslambdaric.__main__.LambdaConfigProvider")
3538
def test_multi_concurrent_path_dispatches_to_multi_concurrent_runner(

0 commit comments

Comments
 (0)