diff options
author | Chase Sterling <chase.sterling@gmail.com> | 2022-01-26 10:25:43 -0500 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2022-01-26 18:44:48 +0000 |
commit | 986375fa864453480bfcc95f246ae603c753d006 (patch) | |
tree | 903269d5c792611e802408e8cdbe48880841a115 | |
parent | 4497c9bbcc280e1a1733cfc973e03caa9cf4eb8a (diff) | |
download | deluge-986375fa864453480bfcc95f246ae603c753d006.tar.gz deluge-986375fa864453480bfcc95f246ae603c753d006.tar.bz2 deluge-986375fa864453480bfcc95f246ae603c753d006.zip |
[Tests] Make sure to return exit code still when ending test daemon
Use a separate Client instance to call test daemon shutdown
-rw-r--r-- | deluge/tests/common.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/deluge/tests/common.py b/deluge/tests/common.py index 13701b8d9..7e73f1dd3 100644 --- a/deluge/tests/common.py +++ b/deluge/tests/common.py @@ -21,7 +21,7 @@ import deluge.core.preferencesmanager import deluge.log from deluge.common import get_localhost_auth from deluge.error import DelugeError -from deluge.ui.client import client +from deluge.ui.client import Client # This sets log level to critical, so use log.critical() to debug while running unit tests deluge.log.setup_logger('none') @@ -156,7 +156,8 @@ class ProcessOutputHandler(protocol.ProcessProtocol): yield shutdown except Exception: self.transport.signalProcess('TERM') - yield self.quit_d + result = yield self.quit_d + return result def _kill_watchdogs(self): """"Cancel all watchdogs""" @@ -305,6 +306,7 @@ except Exception: @defer.inlineCallbacks def shutdown_daemon(): username, password = get_localhost_auth() + client = Client() yield client.connect( 'localhost', listen_port, username=username, password=password ) |