mirror of
https://github.com/django-q2/django-q2.git
synced 2026-09-19 02:48:16 +08:00
adds short delay in test
On some platforms the cluster is not always ready in time for test assertion
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import sys
|
||||
from multiprocessing import Queue, Event, Value
|
||||
import threading
|
||||
from time import sleep
|
||||
|
||||
import os
|
||||
import pytest
|
||||
@@ -52,6 +53,7 @@ def test_cluster_initial(r):
|
||||
assert c.is_running
|
||||
assert c.is_stopping is False
|
||||
assert c.is_starting is False
|
||||
sleep(0.5)
|
||||
stat = c.stat
|
||||
assert stat.status == Conf.IDLE
|
||||
assert c.stop() is True
|
||||
|
||||
Reference in New Issue
Block a user