(self)
| 113 | |
| 114 | @spin |
| 115 | def test_kill(self): |
| 116 | process_manager = salt.utils.process.ProcessManager() |
| 117 | self.addCleanup(process_manager.terminate) |
| 118 | process_manager.add_process(self.spin_kill) |
| 119 | initial_pid = next(iter(process_manager._process_map.keys())) |
| 120 | # kill the child |
| 121 | if salt.utils.platform.is_windows(): |
| 122 | os.kill(initial_pid, signal.SIGTERM) |
| 123 | else: |
| 124 | os.kill(initial_pid, signal.SIGKILL) |
| 125 | # give the OS time to give the signal... |
| 126 | time.sleep(0.1) |
| 127 | process_manager.check_children() |
| 128 | assert initial_pid != next(iter(process_manager._process_map.keys())) |
| 129 | |
| 130 | @die |
| 131 | def test_restarting(self): |
nothing calls this directly
no test coverage detected