Skip to content

Commit 1b22b0e

Browse files
committed
Work around testFilterByTags failure (#125109)
A SDK bug[^1] means that these values sometimes don't parse as an integer. We don't need them to do so in order to pass the test, so this commit relaxes the test to accept any string. Closes #125090 Closes #125166 [^1]: aws/aws-sdk-java-v2#5968
1 parent f495171 commit 1b22b0e

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

muted-tests.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -483,12 +483,6 @@ tests:
483483
method: "builds distribution from branches via archives extractedAssemble [bwcDistVersion: 8.3.0, bwcProject: staged, expectedAssembleTaskName:
484484
extractedAssemble, #1]"
485485
issue: https://github.com/elastic/elasticsearch/issues/119870
486-
- class: org.elasticsearch.discovery.ec2.Ec2DiscoveryTests
487-
method: testFilterByMultipleTags
488-
issue: https://github.com/elastic/elasticsearch/issues/125166
489-
- class: org.elasticsearch.discovery.ec2.Ec2DiscoveryTests
490-
method: testFilterByTags
491-
issue: https://github.com/elastic/elasticsearch/issues/125090
492486
- class: org.elasticsearch.xpack.inference.external.request.azureopenai.embeddings.AzureOpenAiEmbeddingsRequestTests
493487
method: testCreateRequest_WithEntraIdDefined
494488
issue: https://github.com/elastic/elasticsearch/issues/125061

plugins/discovery-ec2/src/test/java/org/elasticsearch/discovery/ec2/Ec2DiscoveryTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ protected List<TransportAddress> buildDynamicHosts(Settings nodeSettings, int no
103103
final String[] params = request.split("&");
104104
Arrays.stream(params).filter(entry -> entry.startsWith("Filter.") && entry.contains("=tag%3A")).forEach(entry -> {
105105
final int startIndex = "Filter.".length();
106-
final int filterId = Integer.parseInt(entry.substring(startIndex, entry.indexOf(".", startIndex)));
106+
// TODO ensure the filterId is an ASCII int when https://github.com/aws/aws-sdk-java-v2/issues/5968 fixed
107+
final var filterId = entry.substring(startIndex, entry.indexOf(".", startIndex));
107108
tagsIncluded.put(
108109
entry.substring(entry.indexOf("=tag%3A") + "=tag%3A".length()),
109110
Arrays.stream(params)

0 commit comments

Comments
 (0)