From d1930a3de1bb83fa9fbbccf718d1f49f0c5e3b0a Mon Sep 17 00:00:00 2001 From: Ilan Steemers Date: Wed, 1 Jul 2015 12:52:47 +0200 Subject: [PATCH] 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. --- django_q/tests/test_cluster.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/django_q/tests/test_cluster.py b/django_q/tests/test_cluster.py index 56108c0..57552cb 100644 --- a/django_q/tests/test_cluster.py +++ b/django_q/tests/test_cluster.py @@ -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