Skip to content

Commit

Permalink
Fix synonyms CI tests timeout (elastic#114641)
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosdelest authored and georgewallace committed Oct 25, 2024
1 parent ec4a74e commit 4f16b05
Show file tree
Hide file tree
Showing 11 changed files with 50 additions and 29 deletions.
9 changes: 0 additions & 9 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -259,15 +259,6 @@ tests:
- class: org.elasticsearch.xpack.inference.DefaultElserIT
method: testInferCreatesDefaultElser
issue: https://github.com/elastic/elasticsearch/issues/114503
- class: org.elasticsearch.backwards.MixedClusterClientYamlTestSuiteIT
method: test {p0=synonyms/60_synonym_rule_get/Synonym set not found}
issue: https://github.com/elastic/elasticsearch/issues/114432
- class: org.elasticsearch.backwards.MixedClusterClientYamlTestSuiteIT
method: test {p0=synonyms/60_synonym_rule_get/Get a synonym rule}
issue: https://github.com/elastic/elasticsearch/issues/114443
- class: org.elasticsearch.backwards.MixedClusterClientYamlTestSuiteIT
method: test {p0=synonyms/60_synonym_rule_get/Synonym rule not found}
issue: https://github.com/elastic/elasticsearch/issues/114444
- class: org.elasticsearch.xpack.inference.integration.ModelRegistryIT
method: testGetModel
issue: https://github.com/elastic/elasticsearch/issues/114657
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ setup:

- match: { result: "created" }

- do:
cluster.health:
wait_for_no_initializing_shards: true

- do:
synonyms.get_synonym:
id: test-update-synonyms
Expand Down Expand Up @@ -58,6 +62,10 @@ setup:

- match: { result: "created" }

- do:
cluster.health:
wait_for_no_initializing_shards: true

- do:
synonyms.get_synonym:
id: test-empty-synonyms
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ setup:
synonyms_set:
synonyms: "foo => bar, baz"

# This is to ensure that all index shards (write and read) are available. In serverless this can take some time.
- do:
cluster.health:
wait_for_no_initializing_shards: true

- do:
indices.create:
index: test_index
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ setup:
- synonyms: "test => check"
id: "test-id-3"

# This is to ensure that all index shards (write and read) are available. In serverless this can take some time.
- do:
cluster.health:
wait_for_no_initializing_shards: true

---
"Get synonyms set":
Expand All @@ -31,7 +35,6 @@ setup:
id: "test-id-2"
- synonyms: "test => check"
id: "test-id-3"

---
"Get synonyms set - not found":
- do:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ setup:
- synonyms: "bye => goodbye"
id: "test-id-2"

# This is to ensure that all index shards (write and read) are available. In serverless this can take some time.
- do:
cluster.health:
wait_for_no_initializing_shards: true
---
"Delete synonyms set":
- do:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ setup:
synonyms_set:
- synonyms: "hello, hi"
- synonyms: "goodbye, bye"

# This is to ensure that all index shards (write and read) are available. In serverless this can take some time.
- do:
cluster.health:
wait_for_no_initializing_shards: true

- do:
synonyms.put_synonym:
id: test-synonyms-1
Expand All @@ -23,21 +29,8 @@ setup:
body:
synonyms_set:
- synonyms: "pc, computer"
# set logging to debug for issue: https://github.com/elastic/elasticsearch/issues/102261
- do:
cluster.put_settings:
body:
persistent:
logger.org.elasticsearch.synonyms: DEBUG

---
teardown:
- do:
cluster.put_settings:
body:
persistent:
logger.org.elasticsearch.synonyms: null
---
"List synonyms set":
- do:
synonyms.get_synonyms_sets: { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ setup:
- synonyms: "test => check"
id: "test-id-3"


# This is to ensure that all index shards (write and read) are available. In serverless this can take some time.
- do:
cluster.health:
wait_for_no_initializing_shards: true
---
"Update a synonyms rule":
- do:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ setup:
id: "test-id-2"
- synonyms: "test => check"
id: "test-id-3"

# This is to ensure that all index shards (write and read) are available. In serverless this can take some time.
- do:
cluster.health:
index: .synonyms
timeout: 1m
wait_for_status: green
wait_for_no_initializing_shards: true


---
"Get a synonym rule":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ setup:
- synonyms: "test => check"
id: "test-id-3"

# This is to ensure that all index shards (write and read) are available. In serverless this can take some time.
- do:
cluster.health:
wait_for_no_initializing_shards: true

---
"Delete synonym rule":
- do:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ setup:
- requires:
cluster_features: ["gte_v8.10.0"]
reason: Loading synonyms from index is introduced in 8.10.0

# Create a new synonyms set
- do:
synonyms.put_synonym:
Expand All @@ -14,6 +13,11 @@ setup:
- synonyms: "bye => goodbye"
id: "synonym-rule-2"

# This is to ensure that all index shards (write and read) are available. In serverless this can take some time.
- do:
cluster.health:
wait_for_no_initializing_shards: true

# Create an index with synonym_filter that uses that synonyms set
- do:
indices.create:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
- requires:
cluster_features: ["gte_v8.10.0"]
reason: Reloading analyzers for specific synonym set is introduced in 8.10.0

# Create synonyms_set1
- do:
synonyms.put_synonym:
Expand All @@ -26,6 +25,11 @@
- synonyms: "bye => goodbye"
id: "synonym-rule-2"

# This is to ensure that all index shards (write and read) are available. In serverless this can take some time.
- do:
cluster.health:
wait_for_no_initializing_shards: true

# Create my_index1 with synonym_filter that uses synonyms_set1
- do:
indices.create:
Expand Down

0 comments on commit 4f16b05

Please sign in to comment.