mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-04 11:38:12 +08:00
Fixes Travis hang up
New admin test introduced a task in the queue which was picked up by the cluster on Travis. Switching cluster test to different list key should prevent this.
This commit is contained in:
@@ -32,8 +32,10 @@ def test_redis_connection(r):
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.django_db
|
@pytest.mark.django_db
|
||||||
def test_cluster_initial():
|
def test_cluster_initial(r):
|
||||||
c = Cluster()
|
list_key = 'initial_test:q'
|
||||||
|
r.delete(list_key)
|
||||||
|
c = Cluster(list_key=list_key)
|
||||||
assert c.sentinel is None
|
assert c.sentinel is None
|
||||||
assert c.is_idle
|
assert c.is_idle
|
||||||
assert c.start() > 0
|
assert c.start() > 0
|
||||||
@@ -44,6 +46,7 @@ def test_cluster_initial():
|
|||||||
assert c.stop() is True
|
assert c.stop() is True
|
||||||
assert c.sentinel.is_alive() is False
|
assert c.sentinel.is_alive() is False
|
||||||
assert c.has_stopped
|
assert c.has_stopped
|
||||||
|
r.delete(list_key)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.django_db
|
@pytest.mark.django_db
|
||||||
|
|||||||
Reference in New Issue
Block a user