diff --git a/src/promptflow/tests/executor/unittests/processpool/test_healthy_ensured_process.py b/src/promptflow/tests/executor/unittests/processpool/test_healthy_ensured_process.py index 498f1bbf7db..42fe462c060 100644 --- a/src/promptflow/tests/executor/unittests/processpool/test_healthy_ensured_process.py +++ b/src/promptflow/tests/executor/unittests/processpool/test_healthy_ensured_process.py @@ -27,7 +27,7 @@ def end_process(healthy_ensured_process): class TestHealthyEnsuredProcess: def test_healthy_ensured_process(self): - context = get_multiprocessing_context("fork") + context = get_multiprocessing_context("spawn") healthy_ensured_process = HealthyEnsuredProcess(executor_creation_func, context) assert healthy_ensured_process.is_ready is False task_queue = Queue() @@ -38,7 +38,7 @@ def test_healthy_ensured_process(self): assert healthy_ensured_process.process.is_alive() is False def test_unhealthy_process(self): - context = get_multiprocessing_context("fork") + context = get_multiprocessing_context("spawn") healthy_ensured_process = HealthyEnsuredProcess(executor_creation_func_timeout, context) assert healthy_ensured_process.is_ready is False task_queue = Queue() @@ -49,7 +49,7 @@ def test_unhealthy_process(self): assert healthy_ensured_process.process.is_alive() is False def test_format_current_process(self): - context = get_multiprocessing_context("fork") + context = get_multiprocessing_context("spawn") healthy_ensured_process = HealthyEnsuredProcess(executor_creation_func, context) healthy_ensured_process.process = patch( 'promptflow.executor._line_execution_process_pool.Process', autospec=True) @@ -66,7 +66,7 @@ def test_format_current_process(self): @patch('promptflow.executor._line_execution_process_pool.logger.info', autospec=True) def test_format_completed_process(self, mock_logger_info): - context = get_multiprocessing_context("fork") + context = get_multiprocessing_context("spawn") healthy_ensured_process = HealthyEnsuredProcess(executor_creation_func, context) healthy_ensured_process.process = patch( 'promptflow.executor._line_execution_process_pool.Process', autospec=True)