From 6ba88e16ec5ad5a4d5ce34c9ee6cff3378f6d743 Mon Sep 17 00:00:00 2001 From: Florent Date: Tue, 4 Nov 2014 10:06:22 +0100 Subject: [PATCH] Adds some sleep :/ --- elasticutils/contrib/django/tests/test_tasks.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/elasticutils/contrib/django/tests/test_tasks.py b/elasticutils/contrib/django/tests/test_tasks.py index b2cf820..61b1431 100644 --- a/elasticutils/contrib/django/tests/test_tasks.py +++ b/elasticutils/contrib/django/tests/test_tasks.py @@ -79,7 +79,7 @@ def bulk_index(cls, *args, **kwargs): index_objects(MockMappingType, [1, 2, 3], chunk_size=1) eq_(MockMappingType.bulk_index_count, 3) - # test index and es kwargs + # test index and es kwargs MockMappingType.index_kwarg = None MockMappingType.es_kwarg = None index_objects(MockMappingType, [1, 2, 3]) @@ -105,6 +105,8 @@ def test_tasks_with_custom_id_field(self): # Test index_objects task index_objects(FakeDjangoWithUuidMappingType, ids) FakeDjangoWithUuidMappingType.refresh_index() + # need some sleep ? + from time import sleep; sleep(1) # nothing was indexed because a StandardError was catched silently, # may be explicit should be better. eq_(FakeDjangoWithUuidMappingType.search().count(), 0)