From f8c9ef1bfaf49f516f4ff2b168b856cc25f4547d Mon Sep 17 00:00:00 2001 From: Ilan Date: Thu, 23 Jul 2015 14:57:00 +0200 Subject: [PATCH] adds short delay in test On some platforms the cluster is not always ready in time for test assertion --- django_q/tests/test_cluster.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/django_q/tests/test_cluster.py b/django_q/tests/test_cluster.py index 32a5291..78012ba 100644 --- a/django_q/tests/test_cluster.py +++ b/django_q/tests/test_cluster.py @@ -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