diff --git a/src/openjd/adaptor_runtime/_background/frontend_runner.py b/src/openjd/adaptor_runtime/_background/frontend_runner.py index e47d4dc3..d9bd8644 100644 --- a/src/openjd/adaptor_runtime/_background/frontend_runner.py +++ b/src/openjd/adaptor_runtime/_background/frontend_runner.py @@ -149,7 +149,7 @@ def init( ) args.extend(["--bootstrap-log-file", bootstrap_log_path]) - _logger.debug(f"Running process with args: {args}") + _logger.info(f"Running process with args: {args}") bootstrap_output_path = os.path.join( bootstrap_log_dir, f"adaptor-runtime-background-bootstrap-output-{bootstrap_id}.log" ) diff --git a/test/openjd/adaptor_runtime/integ/test_integration_entrypoint.py b/test/openjd/adaptor_runtime/integ/test_integration_entrypoint.py index d1690ff6..0218c7e4 100644 --- a/test/openjd/adaptor_runtime/integ/test_integration_entrypoint.py +++ b/test/openjd/adaptor_runtime/integ/test_integration_entrypoint.py @@ -112,8 +112,8 @@ def test_start_stop(self, caplog: pytest.LogCaptureFixture, tmp_path: Path): assert "Connected successfully" in caplog.text assert "Running in background daemon mode." in caplog.text assert "Daemon background process stopped." in caplog.text - assert "on_prerun" not in caplog.text - assert "on_postrun" not in caplog.text + assert "on_prerun" in caplog.text + assert "on_postrun" in caplog.text def test_run(self, caplog: pytest.LogCaptureFixture, tmp_path: Path): # GIVEN diff --git a/test/openjd/adaptor_runtime/unit/background/test_frontend_runner.py b/test/openjd/adaptor_runtime/unit/background/test_frontend_runner.py index 0bb19e83..64736f0a 100644 --- a/test/openjd/adaptor_runtime/unit/background/test_frontend_runner.py +++ b/test/openjd/adaptor_runtime/unit/background/test_frontend_runner.py @@ -219,6 +219,34 @@ def test_initializes_backend_process( ) mock_heartbeat.assert_called_once() + def test_arguments_to_daemon_serve_are_logged_at_info_level( + self, + mock_path_exists: MagicMock, + mock_Popen: MagicMock, + caplog: pytest.LogCaptureFixture, + ): + # GIVEN + caplog.set_level("INFO") + mock_path_exists.return_value = False + adaptor_module = ModuleType("") + adaptor_module.__package__ = "package" + conn_file_path = Path("/path") + runner = FrontendRunner() + + # WHEN + runner.init( + adaptor_module=adaptor_module, + connection_file_path=conn_file_path, + ) + + # THEN + assert any( + "Running process with args" in captured_message + for captured_message in caplog.messages + ) + mock_path_exists.assert_called_once_with() + mock_Popen.assert_called_once() + def test_raises_when_adaptor_module_not_package(self): # GIVEN adaptor_module = ModuleType("")