Skip to content

Commit 438f9ad

Browse files
committed
Fixes synonyms CI issues for serverless
1 parent c3d53a8 commit 438f9ad

File tree

10 files changed

+69
-11
lines changed

10 files changed

+69
-11
lines changed

muted-tests.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -354,15 +354,6 @@ tests:
354354
- class: org.elasticsearch.xpack.inference.DefaultElserIT
355355
method: testInferCreatesDefaultElser
356356
issue: https://github.com/elastic/elasticsearch/issues/114503
357-
- class: org.elasticsearch.backwards.MixedClusterClientYamlTestSuiteIT
358-
method: test {p0=synonyms/60_synonym_rule_get/Synonym set not found}
359-
issue: https://github.com/elastic/elasticsearch/issues/114432
360-
- class: org.elasticsearch.backwards.MixedClusterClientYamlTestSuiteIT
361-
method: test {p0=synonyms/60_synonym_rule_get/Get a synonym rule}
362-
issue: https://github.com/elastic/elasticsearch/issues/114443
363-
- class: org.elasticsearch.backwards.MixedClusterClientYamlTestSuiteIT
364-
method: test {p0=synonyms/60_synonym_rule_get/Synonym rule not found}
365-
issue: https://github.com/elastic/elasticsearch/issues/114444
366357
- class: org.elasticsearch.xpack.inference.integration.ModelRegistryIT
367358
method: testGetModel
368359
issue: https://github.com/elastic/elasticsearch/issues/114657

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ setup:
1111
synonyms_set:
1212
synonyms: "foo => bar, baz"
1313

14+
# This is to ensure that all index shards (write and read) are available. In serverless this can take some time.
15+
- do:
16+
cluster.health:
17+
index: .synonyms-2
18+
level: shards
19+
timeout: 10s
20+
wait_for_status: green
21+
1422
- do:
1523
indices.create:
1624
index: test_index

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ setup:
1414
- synonyms: "test => check"
1515
id: "test-id-3"
1616

17+
# This is to ensure that all index shards (write and read) are available. In serverless this can take some time.
18+
- do:
19+
cluster.health:
20+
index: .synonyms-2
21+
level: shards
22+
timeout: 10s
23+
wait_for_status: green
1724

1825
---
1926
"Get synonyms set":

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ setup:
1212
- synonyms: "bye => goodbye"
1313
id: "test-id-2"
1414

15+
# This is to ensure that all index shards (write and read) are available. In serverless this can take some time.
16+
- do:
17+
cluster.health:
18+
index: .synonyms-2
19+
level: shards
20+
timeout: 10s
21+
wait_for_status: green
22+
1523
---
1624
"Delete synonyms set":
1725
- do:

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@ setup:
3030
persistent:
3131
logger.org.elasticsearch.synonyms: DEBUG
3232

33+
# This is to ensure that all 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+
timeout: 10s
39+
wait_for_status: green
40+
41+
3342
---
3443
teardown:
3544
- do:

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ setup:
1414
- synonyms: "test => check"
1515
id: "test-id-3"
1616

17+
# This is to ensure that all index shards (write and read) are available. In serverless this can take some time.
18+
- do:
19+
cluster.health:
20+
index: .synonyms-2
21+
level: shards
22+
timeout: 10s
23+
wait_for_status: green
1724

1825
---
1926
"Update a synonyms rule":

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@ setup:
1313
id: "test-id-2"
1414
- synonyms: "test => check"
1515
id: "test-id-3"
16+
17+
# This is to ensure that all index shards (write and read) are available. In serverless this can take some time.
1618
- do:
1719
cluster.health:
18-
index: .synonyms
19-
timeout: 1m
20+
index: .synonyms-2
21+
level: shards
22+
timeout: 10s
2023
wait_for_status: green
2124

2225
---

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ setup:
1414
- synonyms: "test => check"
1515
id: "test-id-3"
1616

17+
# This is to ensure that all index shards (write and read) are available. In serverless this can take some time.
18+
- do:
19+
cluster.health:
20+
index: .synonyms-2
21+
level: shards
22+
timeout: 10s
23+
wait_for_status: green
24+
25+
1726
---
1827
"Delete synonym rule":
1928
- do:

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/80_synonyms_from_index.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ setup:
1414
- synonyms: "bye => goodbye"
1515
id: "synonym-rule-2"
1616

17+
# This is to ensure that all index shards (write and read) are available. In serverless this can take some time.
18+
- do:
19+
cluster.health:
20+
index: .synonyms-2
21+
level: shards
22+
timeout: 10s
23+
wait_for_status: green
24+
1725
# Create an index with synonym_filter that uses that synonyms set
1826
- do:
1927
indices.create:

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/90_synonyms_reloading_for_synset.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@
2626
- synonyms: "bye => goodbye"
2727
id: "synonym-rule-2"
2828

29+
# This is to ensure that all index shards (write and read) are available. In serverless this can take some time.
30+
- do:
31+
cluster.health:
32+
index: .synonyms-2
33+
level: shards
34+
timeout: 10s
35+
wait_for_status: green
36+
2937
# Create my_index1 with synonym_filter that uses synonyms_set1
3038
- do:
3139
indices.create:

0 commit comments

Comments
 (0)