Skip to content

Commit df817e7

Browse files
committed
Wait for 2 active shards, remove yellow status
1 parent 92bf1d0 commit df817e7

File tree

12 files changed

+41
-20
lines changed

12 files changed

+41
-20
lines changed

.idea/runConfigurations/Debug_Elasticsearch__node_2_.xml

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/Debug_Elasticsearch__node_3_.xml

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/10_synonyms_put.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ setup:
1515

1616
- match: { result: "created" }
1717

18+
# This is to ensure that at least two index shards (write and read) are available. In serverless this can take some time.
19+
- do:
20+
cluster.health:
21+
index: .synonyms-2
22+
level: shards
23+
wait_for_active_shards: 2
24+
timeout: 1m
25+
1826
- do:
1927
synonyms.get_synonym:
2028
id: test-update-synonyms
@@ -44,6 +52,13 @@ setup:
4452
synonyms_set:
4553
- synonyms: "other, another"
4654

55+
- do:
56+
cluster.health:
57+
index: .synonyms-2
58+
level: shards
59+
wait_for_active_shards: 2
60+
timeout: 1m
61+
4762
- match: { result: "updated" }
4863
- match: { reload_analyzers_details._shards.total: 0 }
4964
- length: { reload_analyzers_details.reload_details: 0 }
@@ -58,6 +73,13 @@ setup:
5873

5974
- match: { result: "created" }
6075

76+
- do:
77+
cluster.health:
78+
index: .synonyms-2
79+
level: shards
80+
wait_for_active_shards: 2
81+
timeout: 1m
82+
6183
- do:
6284
synonyms.get_synonym:
6385
id: test-empty-synonyms

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/110_synonyms_invalid.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ setup:
1818
level: shards
1919
wait_for_active_shards: 2
2020
timeout: 1m
21-
wait_for_status: yellow
2221

2322
- do:
2423
indices.create:

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/20_synonyms_get.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ setup:
2121
level: shards
2222
wait_for_active_shards: 2
2323
timeout: 1m
24-
wait_for_status: yellow
2524

2625
---
2726
"Get synonyms set":

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/30_synonyms_delete.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ setup:
1919
level: shards
2020
wait_for_active_shards: 2
2121
timeout: 1m
22-
wait_for_status: yellow
2322

2423
---
2524
"Delete synonyms set":

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/40_synonyms_sets_get.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ setup:
99
synonyms_set:
1010
- synonyms: "hello, hi"
1111
- synonyms: "goodbye, bye"
12+
13+
# This is to ensure that at least two index shards (write and read) are available. In serverless this can take some time.
14+
- do:
15+
cluster.health:
16+
index: .synonyms-2
17+
level: shards
18+
wait_for_active_shards: 2
19+
timeout: 1m
20+
1221
- do:
1322
synonyms.put_synonym:
1423
id: test-synonyms-1
@@ -30,16 +39,6 @@ setup:
3039
persistent:
3140
logger.org.elasticsearch.synonyms: DEBUG
3241

33-
# This is to ensure that at least two index shards (write and read) are available. In serverless this can take some time.
34-
- do:
35-
cluster.health:
36-
index: .synonyms-2
37-
level: shards
38-
wait_for_active_shards: 2
39-
timeout: 1m
40-
wait_for_status: yellow
41-
42-
4342
---
4443
teardown:
4544
- do:

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/50_synonym_rule_put.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ setup:
2121
level: shards
2222
wait_for_active_shards: 2
2323
timeout: 1m
24-
wait_for_status: yellow
2524

2625
---
2726
"Update a synonyms rule":

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/60_synonym_rule_get.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ setup:
2121
level: shards
2222
wait_for_active_shards: 2
2323
timeout: 20s
24-
wait_for_status: yellow
2524

2625
---
2726
"Get a synonym rule":

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/70_synonym_rule_delete.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ setup:
2121
level: shards
2222
wait_for_active_shards: 2
2323
timeout: 1m
24-
wait_for_status: yellow
2524

2625

2726
---

0 commit comments

Comments
 (0)