From 438f9ad2d44f0d77371dc96dc4c0e717721ad91a Mon Sep 17 00:00:00 2001 From: carlosdelest Date: Fri, 11 Oct 2024 18:12:26 +0200 Subject: [PATCH 01/30] Fixes synonyms CI issues for serverless --- muted-tests.yml | 9 --------- .../rest-api-spec/test/synonyms/110_synonyms_invalid.yml | 8 ++++++++ .../rest-api-spec/test/synonyms/20_synonyms_get.yml | 7 +++++++ .../rest-api-spec/test/synonyms/30_synonyms_delete.yml | 8 ++++++++ .../rest-api-spec/test/synonyms/40_synonyms_sets_get.yml | 9 +++++++++ .../rest-api-spec/test/synonyms/50_synonym_rule_put.yml | 7 +++++++ .../rest-api-spec/test/synonyms/60_synonym_rule_get.yml | 7 +++++-- .../test/synonyms/70_synonym_rule_delete.yml | 9 +++++++++ .../test/synonyms/80_synonyms_from_index.yml | 8 ++++++++ .../test/synonyms/90_synonyms_reloading_for_synset.yml | 8 ++++++++ 10 files changed, 69 insertions(+), 11 deletions(-) diff --git a/muted-tests.yml b/muted-tests.yml index 51d74f12e4925..5047f077caf94 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -354,15 +354,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 diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/110_synonyms_invalid.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/110_synonyms_invalid.yml index d3d0a3bb4df70..72f66d10339f8 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/110_synonyms_invalid.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/110_synonyms_invalid.yml @@ -11,6 +11,14 @@ 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: + index: .synonyms-2 + level: shards + timeout: 10s + wait_for_status: green + - do: indices.create: index: test_index diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/20_synonyms_get.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/20_synonyms_get.yml index 3494f33466ce4..aa8ea8880ae89 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/20_synonyms_get.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/20_synonyms_get.yml @@ -14,6 +14,13 @@ 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: + index: .synonyms-2 + level: shards + timeout: 10s + wait_for_status: green --- "Get synonyms set": diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/30_synonyms_delete.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/30_synonyms_delete.yml index 351ff4e186d8a..a2a136fe74a07 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/30_synonyms_delete.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/30_synonyms_delete.yml @@ -12,6 +12,14 @@ 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: + index: .synonyms-2 + level: shards + timeout: 10s + wait_for_status: green + --- "Delete synonyms set": - do: diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/40_synonyms_sets_get.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/40_synonyms_sets_get.yml index 723c41e163eb8..c973b87ef2216 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/40_synonyms_sets_get.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/40_synonyms_sets_get.yml @@ -30,6 +30,15 @@ setup: persistent: logger.org.elasticsearch.synonyms: DEBUG + # 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-2 + level: shards + timeout: 10s + wait_for_status: green + + --- teardown: - do: diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/50_synonym_rule_put.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/50_synonym_rule_put.yml index f3711bb0774ca..fa617ca582f42 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/50_synonym_rule_put.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/50_synonym_rule_put.yml @@ -14,6 +14,13 @@ 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: + index: .synonyms-2 + level: shards + timeout: 10s + wait_for_status: green --- "Update a synonyms rule": diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/60_synonym_rule_get.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/60_synonym_rule_get.yml index 2a7c8aff89d8e..ef7e9b87e25ff 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/60_synonym_rule_get.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/60_synonym_rule_get.yml @@ -13,10 +13,13 @@ 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 + index: .synonyms-2 + level: shards + timeout: 10s wait_for_status: green --- diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/70_synonym_rule_delete.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/70_synonym_rule_delete.yml index a4853b0b6d414..e5fd330a2bc35 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/70_synonym_rule_delete.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/70_synonym_rule_delete.yml @@ -14,6 +14,15 @@ 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: + index: .synonyms-2 + level: shards + timeout: 10s + wait_for_status: green + + --- "Delete synonym rule": - do: diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/80_synonyms_from_index.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/80_synonyms_from_index.yml index 89ad933370e1c..a844058ef5c57 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/80_synonyms_from_index.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/80_synonyms_from_index.yml @@ -14,6 +14,14 @@ 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: + index: .synonyms-2 + level: shards + timeout: 10s + wait_for_status: green + # Create an index with synonym_filter that uses that synonyms set - do: indices.create: diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/90_synonyms_reloading_for_synset.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/90_synonyms_reloading_for_synset.yml index dc94b36222402..6770288ac4314 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/90_synonyms_reloading_for_synset.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/90_synonyms_reloading_for_synset.yml @@ -26,6 +26,14 @@ - 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: + index: .synonyms-2 + level: shards + timeout: 10s + wait_for_status: green + # Create my_index1 with synonym_filter that uses synonyms_set1 - do: indices.create: From 7641f2be0e18b70ff34eb0c5c9b37aa0e919c20d Mon Sep 17 00:00:00 2001 From: carlosdelest Date: Fri, 11 Oct 2024 20:15:22 +0200 Subject: [PATCH 02/30] Change timeout --- .../rest-api-spec/test/synonyms/110_synonyms_invalid.yml | 2 +- .../resources/rest-api-spec/test/synonyms/20_synonyms_get.yml | 2 +- .../rest-api-spec/test/synonyms/30_synonyms_delete.yml | 2 +- .../rest-api-spec/test/synonyms/40_synonyms_sets_get.yml | 2 +- .../rest-api-spec/test/synonyms/50_synonym_rule_put.yml | 2 +- .../rest-api-spec/test/synonyms/60_synonym_rule_get.yml | 2 +- .../rest-api-spec/test/synonyms/70_synonym_rule_delete.yml | 2 +- .../rest-api-spec/test/synonyms/80_synonyms_from_index.yml | 2 +- .../test/synonyms/90_synonyms_reloading_for_synset.yml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/110_synonyms_invalid.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/110_synonyms_invalid.yml index 72f66d10339f8..cec9f0d44305f 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/110_synonyms_invalid.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/110_synonyms_invalid.yml @@ -16,7 +16,7 @@ setup: cluster.health: index: .synonyms-2 level: shards - timeout: 10s + timeout: 1m wait_for_status: green - do: diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/20_synonyms_get.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/20_synonyms_get.yml index aa8ea8880ae89..9440f84f84983 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/20_synonyms_get.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/20_synonyms_get.yml @@ -19,7 +19,7 @@ setup: cluster.health: index: .synonyms-2 level: shards - timeout: 10s + timeout: 1m wait_for_status: green --- diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/30_synonyms_delete.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/30_synonyms_delete.yml index a2a136fe74a07..2ffd42e4452da 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/30_synonyms_delete.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/30_synonyms_delete.yml @@ -17,7 +17,7 @@ setup: cluster.health: index: .synonyms-2 level: shards - timeout: 10s + timeout: 1m wait_for_status: green --- diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/40_synonyms_sets_get.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/40_synonyms_sets_get.yml index c973b87ef2216..133b620c579a4 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/40_synonyms_sets_get.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/40_synonyms_sets_get.yml @@ -35,7 +35,7 @@ setup: cluster.health: index: .synonyms-2 level: shards - timeout: 10s + timeout: 1m wait_for_status: green diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/50_synonym_rule_put.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/50_synonym_rule_put.yml index fa617ca582f42..7220e4ee8e3b7 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/50_synonym_rule_put.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/50_synonym_rule_put.yml @@ -19,7 +19,7 @@ setup: cluster.health: index: .synonyms-2 level: shards - timeout: 10s + timeout: 1m wait_for_status: green --- diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/60_synonym_rule_get.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/60_synonym_rule_get.yml index ef7e9b87e25ff..db5ae23e1a944 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/60_synonym_rule_get.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/60_synonym_rule_get.yml @@ -19,7 +19,7 @@ setup: cluster.health: index: .synonyms-2 level: shards - timeout: 10s + timeout: 1m wait_for_status: green --- diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/70_synonym_rule_delete.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/70_synonym_rule_delete.yml index e5fd330a2bc35..d0f6bfa97b048 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/70_synonym_rule_delete.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/70_synonym_rule_delete.yml @@ -19,7 +19,7 @@ setup: cluster.health: index: .synonyms-2 level: shards - timeout: 10s + timeout: 1m wait_for_status: green diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/80_synonyms_from_index.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/80_synonyms_from_index.yml index a844058ef5c57..c0ad1dae27866 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/80_synonyms_from_index.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/80_synonyms_from_index.yml @@ -19,7 +19,7 @@ setup: cluster.health: index: .synonyms-2 level: shards - timeout: 10s + timeout: 1m wait_for_status: green # Create an index with synonym_filter that uses that synonyms set diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/90_synonyms_reloading_for_synset.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/90_synonyms_reloading_for_synset.yml index 6770288ac4314..c86a634f944ea 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/90_synonyms_reloading_for_synset.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/90_synonyms_reloading_for_synset.yml @@ -31,7 +31,7 @@ cluster.health: index: .synonyms-2 level: shards - timeout: 10s + timeout: 1m wait_for_status: green # Create my_index1 with synonym_filter that uses synonyms_set1 From 92bf1d00fc83912339ede981fb7a910f7c4c488b Mon Sep 17 00:00:00 2001 From: carlosdelest Date: Mon, 14 Oct 2024 19:34:58 +0200 Subject: [PATCH 03/30] Change status and wait for active shards --- .../rest-api-spec/test/synonyms/110_synonyms_invalid.yml | 5 +++-- .../rest-api-spec/test/synonyms/20_synonyms_get.yml | 5 +++-- .../rest-api-spec/test/synonyms/30_synonyms_delete.yml | 5 +++-- .../rest-api-spec/test/synonyms/40_synonyms_sets_get.yml | 5 +++-- .../rest-api-spec/test/synonyms/50_synonym_rule_put.yml | 5 +++-- .../rest-api-spec/test/synonyms/60_synonym_rule_get.yml | 7 ++++--- .../rest-api-spec/test/synonyms/70_synonym_rule_delete.yml | 5 +++-- .../rest-api-spec/test/synonyms/80_synonyms_from_index.yml | 5 +++-- .../test/synonyms/90_synonyms_reloading_for_synset.yml | 5 +++-- 9 files changed, 28 insertions(+), 19 deletions(-) diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/110_synonyms_invalid.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/110_synonyms_invalid.yml index cec9f0d44305f..b0559e9fa3653 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/110_synonyms_invalid.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/110_synonyms_invalid.yml @@ -11,13 +11,14 @@ 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. + # This is to ensure that at least two index shards (write and read) are available. In serverless this can take some time. - do: cluster.health: index: .synonyms-2 level: shards + wait_for_active_shards: 2 timeout: 1m - wait_for_status: green + wait_for_status: yellow - do: indices.create: diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/20_synonyms_get.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/20_synonyms_get.yml index 9440f84f84983..64ad932b40381 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/20_synonyms_get.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/20_synonyms_get.yml @@ -14,13 +14,14 @@ 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. + # This is to ensure that at least two index shards (write and read) are available. In serverless this can take some time. - do: cluster.health: index: .synonyms-2 level: shards + wait_for_active_shards: 2 timeout: 1m - wait_for_status: green + wait_for_status: yellow --- "Get synonyms set": diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/30_synonyms_delete.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/30_synonyms_delete.yml index 2ffd42e4452da..f17d4fdfbc0e2 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/30_synonyms_delete.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/30_synonyms_delete.yml @@ -12,13 +12,14 @@ 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. + # This is to ensure that at least two index shards (write and read) are available. In serverless this can take some time. - do: cluster.health: index: .synonyms-2 level: shards + wait_for_active_shards: 2 timeout: 1m - wait_for_status: green + wait_for_status: yellow --- "Delete synonyms set": diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/40_synonyms_sets_get.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/40_synonyms_sets_get.yml index 133b620c579a4..aa1c699f12120 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/40_synonyms_sets_get.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/40_synonyms_sets_get.yml @@ -30,13 +30,14 @@ setup: persistent: logger.org.elasticsearch.synonyms: DEBUG - # This is to ensure that all index shards (write and read) are available. In serverless this can take some time. + # This is to ensure that at least two index shards (write and read) are available. In serverless this can take some time. - do: cluster.health: index: .synonyms-2 level: shards + wait_for_active_shards: 2 timeout: 1m - wait_for_status: green + wait_for_status: yellow --- diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/50_synonym_rule_put.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/50_synonym_rule_put.yml index 7220e4ee8e3b7..8cb406b9918d7 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/50_synonym_rule_put.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/50_synonym_rule_put.yml @@ -14,13 +14,14 @@ 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. + # This is to ensure that at least two index shards (write and read) are available. In serverless this can take some time. - do: cluster.health: index: .synonyms-2 level: shards + wait_for_active_shards: 2 timeout: 1m - wait_for_status: green + wait_for_status: yellow --- "Update a synonyms rule": diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/60_synonym_rule_get.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/60_synonym_rule_get.yml index db5ae23e1a944..1f5a59338e80b 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/60_synonym_rule_get.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/60_synonym_rule_get.yml @@ -14,13 +14,14 @@ 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. + # This is to ensure that at least two index shards (write and read) are available. In serverless this can take some time. - do: cluster.health: index: .synonyms-2 level: shards - timeout: 1m - wait_for_status: green + wait_for_active_shards: 2 + timeout: 20s + wait_for_status: yellow --- "Get a synonym rule": diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/70_synonym_rule_delete.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/70_synonym_rule_delete.yml index d0f6bfa97b048..177c5df32a79e 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/70_synonym_rule_delete.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/70_synonym_rule_delete.yml @@ -14,13 +14,14 @@ 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. + # This is to ensure that at least two index shards (write and read) are available. In serverless this can take some time. - do: cluster.health: index: .synonyms-2 level: shards + wait_for_active_shards: 2 timeout: 1m - wait_for_status: green + wait_for_status: yellow --- diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/80_synonyms_from_index.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/80_synonyms_from_index.yml index c0ad1dae27866..3b6fc352716a1 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/80_synonyms_from_index.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/80_synonyms_from_index.yml @@ -14,13 +14,14 @@ 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. + # This is to ensure that at least two index shards (write and read) are available. In serverless this can take some time. - do: cluster.health: index: .synonyms-2 level: shards + wait_for_active_shards: 2 timeout: 1m - wait_for_status: green + wait_for_status: yellow # Create an index with synonym_filter that uses that synonyms set - do: diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/90_synonyms_reloading_for_synset.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/90_synonyms_reloading_for_synset.yml index c86a634f944ea..bd63b12c21f8d 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/90_synonyms_reloading_for_synset.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/90_synonyms_reloading_for_synset.yml @@ -26,13 +26,14 @@ - 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. + # This is to ensure that at least two index shards (write and read) are available. In serverless this can take some time. - do: cluster.health: index: .synonyms-2 level: shards + wait_for_active_shards: 2 timeout: 1m - wait_for_status: green + wait_for_status: yellow # Create my_index1 with synonym_filter that uses synonyms_set1 - do: From df817e72b0c7de7e1c4288520dc6329b293a38d3 Mon Sep 17 00:00:00 2001 From: carlosdelest Date: Tue, 15 Oct 2024 08:14:07 +0200 Subject: [PATCH 04/30] Wait for 2 active shards, remove yellow status --- .../Debug_Elasticsearch__node_2_.xml | 6 ++++- .../Debug_Elasticsearch__node_3_.xml | 6 ++++- .../test/synonyms/10_synonyms_put.yml | 22 +++++++++++++++++++ .../test/synonyms/110_synonyms_invalid.yml | 1 - .../test/synonyms/20_synonyms_get.yml | 1 - .../test/synonyms/30_synonyms_delete.yml | 1 - .../test/synonyms/40_synonyms_sets_get.yml | 19 ++++++++-------- .../test/synonyms/50_synonym_rule_put.yml | 1 - .../test/synonyms/60_synonym_rule_get.yml | 1 - .../test/synonyms/70_synonym_rule_delete.yml | 1 - .../test/synonyms/80_synonyms_from_index.yml | 1 - .../90_synonyms_reloading_for_synset.yml | 1 - 12 files changed, 41 insertions(+), 20 deletions(-) diff --git a/.idea/runConfigurations/Debug_Elasticsearch__node_2_.xml b/.idea/runConfigurations/Debug_Elasticsearch__node_2_.xml index 94bb079398ffd..587ec883c00f5 100644 --- a/.idea/runConfigurations/Debug_Elasticsearch__node_2_.xml +++ b/.idea/runConfigurations/Debug_Elasticsearch__node_2_.xml @@ -6,6 +6,10 @@