Exemplo n.º 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()
Exemplo n.º 2
0
    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))