Skip to content
This repository has been archived by the owner on Feb 20, 2019. It is now read-only.

Commit

Permalink
Adds some sleep :/
Browse files Browse the repository at this point in the history
  • Loading branch information
Florent committed Nov 4, 2014
1 parent ba5bbb2 commit 6ba88e1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion elasticutils/contrib/django/tests/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand All @@ -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)
Expand Down

0 comments on commit 6ba88e1

Please sign in to comment.