mirror of
https://github.com/django-q2/django-q2.git
synced 2026-09-19 19:08:07 +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
|
||||
def test_cluster_initial():
|
||||
c = Cluster()
|
||||
def test_cluster_initial(r):
|
||||
list_key = 'initial_test:q'
|
||||
r.delete(list_key)
|
||||
c = Cluster(list_key=list_key)
|
||||
assert c.sentinel is None
|
||||
assert c.is_idle
|
||||
assert c.start() > 0
|
||||
@@ -44,6 +46,7 @@ def test_cluster_initial():
|
||||
assert c.stop() is True
|
||||
assert c.sentinel.is_alive() is False
|
||||
assert c.has_stopped
|
||||
r.delete(list_key)
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
|
||||
Reference in New Issue
Block a user