fix: preserve native calls on stop and keep status reads observational
This commit is contained in:
1 parent
97a3de20c9
commit
8d3eab1164
19 files changed
+631
-290
No files matched your search
@@ -72,7 +72,7 @@ def test_crashed_worker_cannot_pass_even_with_pass_file(tmp_path, monkeypatch, o
|
||||
assert result.safe_to_continue is True # Proven release permits another item; crash stays FAIL.
|
||||
|
||||
|
||||
def test_supervisor_crash_stops_registered_save_helper_but_not_native(tmp_path):
|
||||
def test_supervisor_crash_preserves_registered_save_caller_and_native(tmp_path):
|
||||
import subprocess, sys, time
|
||||
import win32api, win32con, win32process, win32event
|
||||
supervisor = subprocess.Popen([sys.executable, '-c', 'import time; time.sleep(30)'])
|
||||
@@ -98,8 +98,9 @@ def test_supervisor_crash_stops_registered_save_helper_but_not_native(tmp_path):
|
||||
win32con.PROCESS_TERMINATE | win32con.SYNCHRONIZE, False, pid))
|
||||
supervisor.terminate()
|
||||
supervisor.wait(5)
|
||||
assert worker.wait(8) == 75
|
||||
assert win32event.WaitForSingleObject(handles[1], 3000) == win32con.WAIT_OBJECT_0
|
||||
time.sleep(.5)
|
||||
assert worker.poll() is None
|
||||
assert win32event.WaitForSingleObject(handles[1], 0) == win32con.WAIT_TIMEOUT
|
||||
assert win32process.GetExitCodeProcess(handles[0]) == 259
|
||||
finally:
|
||||
for process in (supervisor, worker):
|
||||
|
||||
Reference in new issue
Block a user