Skip to content

Commit 0c28ba2

Browse files
committed
Count through the primary in list of strings test
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.
1 parent b605c33 commit 0c28ba2

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

rest-api-spec/src/main/resources/rest-api-spec/test/bulk/20_list_of_strings.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
---
22
"List of strings":
3-
- do:
4-
indices.create:
5-
index: text_index
6-
wait_for_active_shards: all
7-
83
- do:
94
bulk:
105
refresh: true
@@ -16,6 +11,8 @@
1611

1712
- do:
1813
count:
14+
# we count through the primary in case there is a replica that has not yet fully recovered
15+
preference: _primary
1916
index: test_index
2017

2118
- match: {count: 2}

0 commit comments

Comments
 (0)