Skip to content

Commit d09d57d

Browse files
authored
Fix BwC synonyms tests (#118691)
1 parent ce7a0c8 commit d09d57d

File tree

3 files changed

+28
-9
lines changed

3 files changed

+28
-9
lines changed

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,6 @@ tests:
156156
issue: https://github.com/elastic/elasticsearch/issues/117473
157157
- class: org.elasticsearch.repositories.s3.RepositoryS3EcsClientYamlTestSuiteIT
158158
issue: https://github.com/elastic/elasticsearch/issues/117525
159-
- class: org.elasticsearch.backwards.MixedClusterClientYamlTestSuiteIT
160-
method: test {p0=synonyms/90_synonyms_reloading_for_synset/Reload analyzers for specific synonym set}
161-
issue: https://github.com/elastic/elasticsearch/issues/116777
162159
- class: "org.elasticsearch.xpack.esql.qa.multi_node.EsqlSpecIT"
163160
method: "test {scoring.*}"
164161
issue: https://github.com/elastic/elasticsearch/issues/117641

rest-api-spec/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,5 @@ tasks.named("yamlRestCompatTestTransform").configure ({ task ->
6969
task.skipTest("search/520_fetch_fields/fetch _seq_no via fields", "error code is changed from 5xx to 400 in 9.0")
7070
task.skipTest("search.vectors/41_knn_search_bbq_hnsw/Test knn search", "Scoring has changed in latest versions")
7171
task.skipTest("search.vectors/42_knn_search_bbq_flat/Test knn search", "Scoring has changed in latest versions")
72+
task.skipTest("synonyms/90_synonyms_reloading_for_synset/Reload analyzers for specific synonym set", "Can't work until auto-expand replicas is 0-1 for synonyms index")
7273
})

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

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
---
2-
"Reload analyzers for specific synonym set":
1+
setup:
32
- requires:
43
cluster_features: ["gte_v8.10.0"]
54
reason: Reloading analyzers for specific synonym set is introduced in 8.10.0
5+
66
# Create synonyms_set1
77
- do:
88
synonyms.put_synonym:
@@ -100,21 +100,25 @@
100100
- '{"index": {"_index": "my_index2", "_id": "2"}}'
101101
- '{"my_field": "goodbye"}'
102102

103-
# An update of synonyms_set1 must trigger auto-reloading of analyzers only for synonyms_set1
103+
---
104+
"Reload analyzers for specific synonym set":
105+
# These specific tests can't succeed in BwC, as synonyms auto-expand replicas are 0-all. Replicas can't be associated to
106+
# upgraded nodes, and thus we are not able to guarantee that the shards are not failed.
107+
# This test is skipped for BwC until synonyms index has auto-exapnd replicas set to 0-1.
108+
104109
- do:
105110
synonyms.put_synonym:
106111
id: synonyms_set1
107112
body:
108113
synonyms_set:
109114
- synonyms: "hello, salute"
110115
- synonyms: "ciao => goodbye"
116+
111117
- match: { result: "updated" }
112118
- gt: { reload_analyzers_details._shards.total: 0 }
113119
- gt: { reload_analyzers_details._shards.successful: 0 }
114120
- match: { reload_analyzers_details._shards.failed: 0 }
115-
- length: { reload_analyzers_details.reload_details: 1 } # reload details contain only a single index
116-
- match: { reload_analyzers_details.reload_details.0.index: "my_index1" }
117-
- match: { reload_analyzers_details.reload_details.0.reloaded_analyzers.0: "my_analyzer1" }
121+
118122

119123
# Confirm that the index analyzers are reloaded for my_index1
120124
- do:
@@ -127,6 +131,23 @@
127131
query: salute
128132
- match: { hits.total.value: 1 }
129133

134+
---
135+
"Check analyzer reloaded and non failed shards for bwc tests":
136+
137+
- do:
138+
synonyms.put_synonym:
139+
id: synonyms_set1
140+
body:
141+
synonyms_set:
142+
- synonyms: "hello, salute"
143+
- synonyms: "ciao => goodbye"
144+
- match: { result: "updated" }
145+
- gt: { reload_analyzers_details._shards.total: 0 }
146+
- gt: { reload_analyzers_details._shards.successful: 0 }
147+
- length: { reload_analyzers_details.reload_details: 1 } # reload details contain only a single index
148+
- match: { reload_analyzers_details.reload_details.0.index: "my_index1" }
149+
- match: { reload_analyzers_details.reload_details.0.reloaded_analyzers.0: "my_analyzer1" }
150+
130151
# Confirm that the index analyzers are still the same for my_index2
131152
- do:
132153
search:

0 commit comments

Comments
 (0)