def test_stop_stops_running_daemon(self) -> None: with self.spawn_fake_edenfs(self.eden_dir) as daemon_pid: stop_process = self.spawn_stop(["--timeout", "5"]) stop_process.expect_exact("edenfs exited cleanly.") self.assert_process_exit_code(stop_process, SHUTDOWN_EXIT_CODE_NORMAL) self.assertTrue(did_process_exit(daemon_pid), f"Process {daemon_pid} should have died")
def test_stop_stops_running_daemon(self) -> None: with self.spawn_fake_edenfs(self.eden_dir) as daemon_pid: stop_process = self.spawn_stop(["--timeout", "5"]) stop_process.expect_exact("edenfs exited cleanly.") self.assert_process_exit_code(stop_process, SHUTDOWN_EXIT_CODE_NORMAL) self.assertTrue( did_process_exit(daemon_pid), f"Process {daemon_pid} should have died" )
def daemon_exited() -> typing.Optional[bool]: if did_process_exit(daemon_pid): return True else: return None
def test_exit_kills_manager(self) -> None: systemd = self.make_temporary_systemd_user_service_manager() process_id = systemd.process_id systemd.exit() self.assertFalse(systemd.is_alive()) self.assertTrue(did_process_exit(process_id))