diff --git a/muted-tests.yml b/muted-tests.yml index 81672399a056d..ea5f2dfbd44ed 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -303,12 +303,6 @@ tests: - class: org.elasticsearch.xpack.inference.integration.AuthorizationTaskExecutorMultipleNodesIT method: testAuthorizationTaskGetsRelocatedToAnotherNode_WhenTheNodeThatIsRunningItShutsDown issue: https://github.com/elastic/elasticsearch/issues/137911 -- class: org.elasticsearch.repositories.blobstore.testkit.rest.SnapshotRepoTestKitClientYamlTestSuiteIT - method: test {p0=/10_analyze/Analysis without details} - issue: https://github.com/elastic/elasticsearch/issues/140627 -- class: org.elasticsearch.repositories.blobstore.testkit.analyze.RepositoryAnalysisSuccessIT - method: testRepositoryAnalysis - issue: https://github.com/elastic/elasticsearch/issues/140638 - class: org.elasticsearch.xpack.esql.qa.single_node.EsqlSpecIT method: test {csv-spec:string.Url_encode_component tests with table reads} issue: https://github.com/elastic/elasticsearch/issues/140621 @@ -339,9 +333,6 @@ tests: - class: org.elasticsearch.xpack.esql.qa.single_node.GenerativeForkIT method: test {csv-spec:string.Url_encode_component tests with table reads} issue: https://github.com/elastic/elasticsearch/issues/140809 -- class: org.elasticsearch.repositories.blobstore.testkit.analyze.RepositoryAnalysisFailureIT - method: testFailsOnCopyAfterWrite - issue: https://github.com/elastic/elasticsearch/issues/140819 - class: org.elasticsearch.xpack.inference.services.jinaai.JinaAIServiceTests method: test_embeddingModel_chunkedInfer_batchesCallsWhenLateChunkingEnabled issue: https://github.com/elastic/elasticsearch/issues/140890 diff --git a/x-pack/plugin/snapshot-repo-test-kit/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/10_analyze.yml b/x-pack/plugin/snapshot-repo-test-kit/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/10_analyze.yml index bcee1691e033c..66801ebb2c9a5 100644 --- a/x-pack/plugin/snapshot-repo-test-kit/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/10_analyze.yml +++ b/x-pack/plugin/snapshot-repo-test-kit/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/10_analyze.yml @@ -86,7 +86,11 @@ setup: - is_true: summary.write.total_throttled - gte: { summary.write.total_elapsed_nanos: 0} - is_true: summary.write.total_elapsed - - gte: { summary.read.count: 10} + + # extraordinarily unlikely but in theory up to half of the writes could be copies, and each of those writes could + # attempt the copy early, fail with a NoSuchFileException, and thus not attempt to read the copy, so we can only + # assert this: + - gte: { summary.read.count: 5} - gte: { summary.read.total_size_bytes: 0} - is_true: summary.read.total_size - gte: { summary.read.total_wait_nanos: 0} diff --git a/x-pack/plugin/snapshot-repo-test-kit/src/internalClusterTest/java/org/elasticsearch/repositories/blobstore/testkit/analyze/RepositoryAnalysisSuccessIT.java b/x-pack/plugin/snapshot-repo-test-kit/src/internalClusterTest/java/org/elasticsearch/repositories/blobstore/testkit/analyze/RepositoryAnalysisSuccessIT.java index 5ffd6883eabb6..a227684ad938d 100644 --- a/x-pack/plugin/snapshot-repo-test-kit/src/internalClusterTest/java/org/elasticsearch/repositories/blobstore/testkit/analyze/RepositoryAnalysisSuccessIT.java +++ b/x-pack/plugin/snapshot-repo-test-kit/src/internalClusterTest/java/org/elasticsearch/repositories/blobstore/testkit/analyze/RepositoryAnalysisSuccessIT.java @@ -170,7 +170,12 @@ static void assertResponseSummaryFields(RepositoryAnalyzeAction.Request request, final var responseMap = convertToMap(response); final var responseString = Strings.toString(response); assertThat(responseString, ObjectPath.eval("summary.write.count", responseMap), equalTo(request.getBlobCount())); - assertThat(responseString, ObjectPath.eval("summary.read.count", responseMap), greaterThanOrEqualTo(request.getBlobCount())); + + // extraordinarily unlikely but in theory up to half of the writes could be copies, and each of those writes could attempt the + // copy early, fail with a NoSuchFileException, and thus not attempt to read the copy, so we can only assert this: + final var minReadCount = request.getBlobCount() / 2; + assertThat(responseString, ObjectPath.eval("summary.read.count", responseMap), greaterThanOrEqualTo(minReadCount)); + assertThat(responseString, ObjectPath.eval("summary.write.total_throttled_nanos", responseMap), equalTo(0)); assertThat(responseString, ObjectPath.eval("summary.read.total_throttled_nanos", responseMap), equalTo(0)); } catch (IOException e) {