From c1e7b6e8f33c754b50172afe51301b1a81e7b640 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 5 Jun 2025 15:09:57 +0200 Subject: [PATCH] tests: Ignore test_restart hang on Windows --- tests/end2end/test_invocations.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/tests/end2end/test_invocations.py b/tests/end2end/test_invocations.py index 3f27ffe0a..8d9f86ab9 100644 --- a/tests/end2end/test_invocations.py +++ b/tests/end2end/test_invocations.py @@ -1039,11 +1039,13 @@ def test_restart(request, quteproc_new): pid = int(line.message.removeprefix(prefix)) os.kill(pid, signal.SIGTERM) - try: - # If the new process hangs, this will hang too. - # Still better than just ignoring it, so we can fix it if something is broken. - os.waitpid(pid, 0) # pid, options... positional-only :( - except (ChildProcessError, PermissionError): - # Already gone. Even if not documented, Windows seems to raise PermissionError - # here... - pass + # This often hangs on Windows for unknown reasons + if not utils.is_windows: + try: + # If the new process hangs, this will hang too. + # Still better than just ignoring it, so we can fix it if something is broken. + os.waitpid(pid, 0) # pid, options... positional-only :( + except (ChildProcessError, PermissionError): + # Already gone. Even if not documented, Windows seems to raise PermissionError + # here... + pass