Skip to content

Commit

Permalink
Wait for index query in tests to hopefully fix random failures.
Browse files Browse the repository at this point in the history
  • Loading branch information
jerith committed Jun 5, 2015
1 parent 4c11cb1 commit 41c8a67
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions vumi/components/tests/test_message_store_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,8 @@ def test_polling_inbound_match_resource(self):

@inlineCallbacks
def test_empty_inbound_match_resource(self):
expected_token = yield self.do_query('inbound', self.batch_id, '.*')
expected_token = yield self.do_query(
'inbound', self.batch_id, '.*', wait=True)
response = yield self.do_get('batch/%s/inbound/match/?token=%s' % (
self.batch_id, expected_token))
self.assertResultCount(response, 0)
Expand Down Expand Up @@ -249,7 +250,8 @@ def test_polling_outbound_match_resource(self):

@inlineCallbacks
def test_empty_outbound_match_resource(self):
expected_token = yield self.do_query('outbound', self.batch_id, '.*')
expected_token = yield self.do_query(
'outbound', self.batch_id, '.*', wait=True)
response = yield self.do_get('batch/%s/outbound/match/?token=%s' % (
self.batch_id, expected_token))
self.assertResultCount(response, 0)
Expand Down

0 comments on commit 41c8a67

Please sign in to comment.