MCPcopy Index your code
hub / github.com/saltstack/salt / test_basic

Method test_basic

tests/unit/utils/test_process.py:102–112  ·  view source on GitHub ↗

Make sure that the process is alive 2s later

(self)

Source from the content-addressed store, hash-verified

100 @spin
101 @pytest.mark.slow_test
102 def test_basic(self):
103 """
104 Make sure that the process is alive 2s later
105 """
106 process_manager = salt.utils.process.ProcessManager()
107 self.addCleanup(process_manager.terminate)
108 process_manager.add_process(self.spin_basic)
109 initial_pid = next(iter(process_manager._process_map.keys()))
110 time.sleep(2)
111 process_manager.check_children()
112 assert initial_pid == next(iter(process_manager._process_map.keys()))
113
114 @spin
115 def test_kill(self):

Callers

nothing calls this directly

Calls 4

add_processMethod · 0.95
check_childrenMethod · 0.95
keysMethod · 0.45
sleepMethod · 0.45

Tested by

no test coverage detected