jgehrcke / gipc

gevent-cooperative child processes and inter-process communication
https://gehrcke.de/gipc
MIT License
83 stars 13 forks source link

test instability: test_terminate might detect SIGKILL instead of SIGTERM #119

Open jgehrcke opened 2 years ago

jgehrcke commented 2 years ago

seen in CI on posix (3.10, macos-10.15, default):

=================================== FAILURES ===================================
__________________________ TestProcess.test_terminate __________________________

self = <test_gipc.TestProcess object at 0x1086d4820>

    def test_terminate(self):
        # 1s is too long, and the process is killed on python 3.8.6
        p = start_process(gevent.sleep, args=(0.5,))
        # Test __repr__ and __str__
        p.__repr__()
        p.terminate()
        p.join()
        p.__repr__()
>       assert p.exitcode == -signal.SIGTERM
E       assert -9 == -15
E         +-9
E         --15

-9 means that the child process terminated as of SIGKILL, not SIGTERM.

Resolved itself by repeating test: instability.

jgehrcke commented 1 year ago

https://github.com/jgehrcke/gipc/pull/110/files#r644652376 https://github.com/jgehrcke/gipc/pull/126

jgehrcke commented 1 year ago

happened here again: https://github.com/jgehrcke/gipc/actions/runs/4282701770/jobs/7457307302#step:6:116 posix (3.9, macos-10.15, default)