henry3260 commented on code in PR #72464:
URL: https://github.com/apache/airflow/pull/72464#discussion_r3941352388


##########
airflow-core/tests/unit/cli/commands/test_standalone_command.py:
##########
@@ -304,6 +305,18 @@ def test_subcommand_stop_calls_terminate(self, 
monkeypatch):
 
         fake_process.terminate.assert_called_once()
 
+    def 
test_subcommand_stop_does_not_block_siblings_when_a_process_never_started(self):
+        """Shutdown stops each component in turn, so one that never spawned 
must not abort the loop."""
+        never_started = SubCommand(mock.Mock(), "scheduler", ["scheduler"], {})
+        running = SubCommand(mock.Mock(), "triggerer", ["triggerer"], {})

Review Comment:
   `parent` is a bare `mock.Mock()` here while `running.process` below 
correctly uses `spec=subprocess.Popen`. 
   
   ```suggestion
           never_started = SubCommand(mock.Mock(spec=StandaloneCommand), 
"scheduler", ["scheduler"], {})
           running = SubCommand(mock.Mock(spec=StandaloneCommand), "triggerer", 
["triggerer"], {})
   ```



-- 
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