예제 #1
0
 def exit(self) -> None:
     process_id = self.process_id
     # We intentionally do not check the result from the systemctl command here.
     # It may fail with a "Connection reset by peer" error due to systemd exiting.
     # We simply confirm that systemd exits after running this command.
     self._systemctl.run(["start", "exit.target"])
     if not wait_for_process_exit(process_id, timeout=60):
         raise TimeoutError()
예제 #2
0
파일: stop_test.py 프로젝트: simpkins/eden
    def test_async_stop_stops_daemon_eventually(self) -> None:
        with self.spawn_fake_edenfs(self.eden_dir) as daemon_pid:
            stop_process = self.spawn_stop(["--timeout", "0"])
            stop_process.expect_exact("Sent async shutdown request to edenfs.")
            self.assert_process_exit_code(
                stop_process, SHUTDOWN_EXIT_CODE_REQUESTED_SHUTDOWN)

            self.assertTrue(wait_for_process_exit(daemon_pid, timeout=10))