summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCalum Lind <calumlind+deluge@gmail.com>2023-11-27 16:27:34 +0100
committerCalum Lind <calumlind+deluge@gmail.com>2023-11-27 16:48:24 +0100
commit42accef2950d7f92cf9d6cbc323f1ff5c7682901 (patch)
tree63bd1e480ff33a49d46b13b800cdcb3f96ca6c4d
parent[Core] Refactor Alertmanager to retry unhandled alerts (diff)
downloaddeluge-42accef2950d7f92cf9d6cbc323f1ff5c7682901.tar.xz
deluge-42accef2950d7f92cf9d6cbc323f1ff5c7682901.zip
[Tests] Fix unhandled ProcessTerminated trying to kill daemon in clean
The GitHub CI tests on Linux were failing due to ProcessTerminated > await daemon.kill() E twisted.internet.error.ProcessTerminated: A process has ended with a probable error condition: process ended by signal 6. Added a try..except in daemon as a quick solution but might need to investigate the ProcessOutputHandler.kill method.
-rw-r--r--deluge/conftest.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/deluge/conftest.py b/deluge/conftest.py
index ca25cce8e..c3070140d 100644
--- a/deluge/conftest.py
+++ b/deluge/conftest.py
@@ -12,7 +12,7 @@ import pytest
import pytest_twisted
from twisted.internet import reactor
from twisted.internet.defer import Deferred, maybeDeferred
-from twisted.internet.error import CannotListenError
+from twisted.internet.error import CannotListenError, ProcessTerminated
from twisted.python.failure import Failure
import deluge.component as _component
@@ -120,7 +120,10 @@ async def daemon(request, config_dir, tmp_path):
raise exception_error
daemon.listen_port = listen_port
yield daemon
- await daemon.kill()
+ try:
+ await daemon.kill()
+ except ProcessTerminated:
+ pass
@pytest.fixture(autouse=True)