Skip to content

Commit

Permalink
Count through the primary in list of strings test
Browse files Browse the repository at this point in the history
A previous attempt to address a race condition in this test set wait for
active shards to all. However, there might not be any replicas if the
test is only running with one node so we end up waiting
forever. Instead, to address the intial race condition, we just count
through the primary.
  • Loading branch information
jasontedor committed Mar 22, 2017
1 parent 35da8d0 commit 3adb13b
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
---
"List of strings":
- do:
indices.create:
index: text_index
wait_for_active_shards: all

- do:
bulk:
refresh: true
Expand All @@ -16,6 +11,8 @@

- do:
count:
# we count through the primary in case there is a replica that has not yet fully recovered
preference: _primary
index: test_index

- match: {count: 2}
Expand Down

0 comments on commit 3adb13b

Please sign in to comment.