Merge pull request #2520 from freqtrade/fix/randomtestfailure
[minor] Add sleep to allow thread to start
This commit is contained in:
commit
ec460ab9c9
@ -1,5 +1,5 @@
|
||||
# pragma pylint: disable=missing-docstring, C0103
|
||||
|
||||
import time
|
||||
import logging
|
||||
from unittest.mock import MagicMock
|
||||
|
||||
@ -176,6 +176,8 @@ def test_init_apiserver_enabled(mocker, default_conf, caplog) -> None:
|
||||
"listen_port": "8080"}
|
||||
rpc_manager = RPCManager(get_patched_freqtradebot(mocker, default_conf))
|
||||
|
||||
# Sleep to allow the thread to start
|
||||
time.sleep(0.5)
|
||||
assert log_has('Enabling rpc.api_server', caplog)
|
||||
assert len(rpc_manager.registered_modules) == 1
|
||||
assert 'apiserver' in [mod.name for mod in rpc_manager.registered_modules]
|
||||
|
Loading…
Reference in New Issue
Block a user