pierrejeambrun commented on code in PR #65289:
URL: https://github.com/apache/airflow/pull/65289#discussion_r3101601650


##########
airflow-core/tests/unit/executors/test_local_executor_check_workers.py:
##########
@@ -117,6 +118,19 @@ def test_no_spawn_if_parallelism_reached(setup_executor):
     executor._spawn_worker.assert_not_called()
 
 
[email protected](gc, "freeze")
+def test_no_gc_freeze_when_nothing_to_spawn(mock_freeze, setup_executor):
+    executor = setup_executor
+    executor.parallelism = 1
+    executor._unread_messages.value = 1
+    executor.activity_queue.empty.return_value = False
+    proc1 = MagicMock()
+    proc1.is_alive.return_value = True
+    executor.workers = {1: proc1}
+    executor._check_workers()
+    mock_freeze.assert_not_called()
+

Review Comment:
   This test seems irrelevant. I think `_spawn_workers_with_gc_freeze(0)` is 
never called.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to