Skip to content

Commit b70b96b

Browse files
author
Brett Hazen
committed
Change wait condition for YZ index write to be more deterministic
1 parent 01997c1 commit b70b96b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

riak/tests/test_mapreduce.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,9 @@ def test_mr_search(self):
374374
"sugar_i": 12,
375375
"calories_i": 110,
376376
"fruit_b": False}).store()
377-
time.sleep(1)
377+
# Wait for Solr to catch up
378+
while len(bucket.search('_yz_rk:Crunch')['docs']) == 0:
379+
pass
378380
mr = self.client.search(self.mr_bucket, 'fruit_b:false')
379381
mr.map("""function(v) {
380382
var solr_doc = JSON.parse(v.values[0].data);

0 commit comments

Comments
 (0)