diff options
author | Florian Bruhin <me@the-compiler.org> | 2020-04-20 13:34:26 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2020-04-20 13:34:26 +0200 |
commit | 5985353c4a8d9846fb4b198b19c9210962faf593 (patch) | |
tree | 082309a602fe8557ca918b51432f8df456f958ca | |
parent | 513c8343ca6c89ec4bd2454c5b8b0fce0fe6ee36 (diff) | |
download | qutebrowser-5985353c4a8d9846fb4b198b19c9210962faf593.tar.gz qutebrowser-5985353c4a8d9846fb4b198b19c9210962faf593.zip |
Add a manual editor pidfile check
This also reverts 083d0af1302f87a0c41f553f89f6736f2a215a92 because it turns out
that didn't help in the end.
Not sure what's going on there. A race condition between writing the pidfile
and us waiting for the signal? An issue with the QFileSystemWatcher?
Speculatively fixes #5362.
-rw-r--r-- | tests/end2end/features/test_editor_bdd.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/end2end/features/test_editor_bdd.py b/tests/end2end/features/test_editor_bdd.py index edc4a9927..36719324a 100644 --- a/tests/end2end/features/test_editor_bdd.py +++ b/tests/end2end/features/test_editor_bdd.py @@ -98,6 +98,9 @@ class EditorPidWatcher(QObject): else: self._watcher.addPath(str(self._pidfile)) + def manual_check(self): + return self._pidfile.check() + @pytest.fixture def editor_pid_watcher(tmpdir): @@ -143,9 +146,12 @@ def set_up_editor_wait(quteproc, tmpdir, text, editor_pid_watcher): @bdd.when("I wait until the editor has started") def wait_editor(qtbot, editor_pid_watcher): if not editor_pid_watcher.has_pidfile: - with qtbot.wait_signal(editor_pid_watcher.appeared, timeout=5000): + with qtbot.wait_signal(editor_pid_watcher.appeared, raising=False): pass + if not editor_pid_watcher.manual_check(): + pytest.fail("Editor pidfile failed to appear!") + @bdd.when(bdd.parsers.parse('I kill the waiting editor')) def kill_editor_wait(tmpdir): |