You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A test helper races with the process it watches and fails under load #40
tests.test_kit_check_isolation.CommandAgentGroup.test_a_normal_end_ends_what_it_left_running failed twice in a row in the docker tier on a machine busy with other containers, and passed three times run alone:
File "app/tests/test_kit_check_isolation.py", line 212, in alive
if Path(f"/proc/{pid}/stat").exists() and Path(f"/proc/{pid}/stat").read_text().split()[2] == "Z":
FileNotFoundError: [Errno 2] No such file or directory: '/proc/1450917/stat'
The helper checks that the file exists and then reads it; the process can end between the two. The run it tests did what it should: the process was gone.
Screenshot
No response
Reproduction
Load the machine (other containers running).
python3 app/tests/parallel.py --docker, a few times.
Expected
The helper reads /proc/<pid>/stat once and takes a file that is gone as the process having ended.
Acceptance
alive treats a /proc/<pid>/stat that disappears as not alive, instead of raising.
Activity