Skip to content

Commit b5a92ab

Browse files
committed
try to fix test
1 parent 958b168 commit b5a92ab

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

tests/test_cli.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import time
2-
31
import pytest
42
from click.testing import CliRunner
53

@@ -56,13 +54,11 @@ def test_run_watch(mocker, cancel_remaining_task):
5654
assert 'files changed, reloading arq worker...' in result.output
5755

5856

59-
@pytest.mark.timeout(10) # may take a while to get to the point we can test
60-
def test_multiple_workers():
57+
def test_multiple_workers(mocker, loop):
58+
mocker.patch('asyncio.get_event_loop', lambda: loop)
6159
runner = CliRunner()
6260
result = runner.invoke(cli, ['tests.test_cli.WorkerSettings', '--workers', '4'])
63-
while 'clients_connected=4' not in result.output:
64-
time.sleep(1)
65-
assert True
61+
assert 'clients_connected=4' in result.output
6662

6763

6864
custom_log_dict = {

0 commit comments

Comments
 (0)