Skip to content

Commit

Permalink
[Tests] Fix unhandled ProcessTerminated trying to kill daemon in clean
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cas-- committed Nov 27, 2023
1 parent 54d6f50 commit 42accef
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions deluge/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 42accef

Please sign in to comment.