Skip to content

Commit a525b3d

Browse files
authored
Fix test to anticipate force merge failure (#126282)
This test had a copy paste mistake. When the cluster has only one data node the replicas cannot be assigned so we end up with a force merge error. In the case of the failure store this was not asserted correctly. On the other hand, this test only checked for the existence of an error and it was not ensuring that the current error is not the rollover error that should have recovered. We make this test a bit more explicit. Fixes: #126252
1 parent 78aff25 commit a525b3d

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

modules/data-streams/src/internalClusterTest/java/org/elasticsearch/datastreams/lifecycle/ExplainDataStreamLifecycleIT.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,9 @@ public void testExplainLifecycleForIndicesWithErrors() throws Exception {
486486
* succeed, and there will always be an error in the error store. This behavior is subject to change in the future.
487487
*/
488488
assertThat(response.getIndices().get(0).getError(), is(notNullValue()));
489-
assertThat(response.getIndices().get(1).getError(), is(nullValue()));
489+
assertThat(response.getIndices().get(0).getError().error(), containsString("Force merge request "));
490+
assertThat(response.getIndices().get(1).getError(), is(notNullValue()));
491+
assertThat(response.getIndices().get(1).getError().error(), containsString("Force merge request "));
490492
}
491493
});
492494
}

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -387,9 +387,6 @@ tests:
387387
- class: org.elasticsearch.xpack.searchablesnapshots.SearchableSnapshotsIntegTests
388388
method: testCreateAndRestoreSearchableSnapshot
389389
issue: https://github.com/elastic/elasticsearch/issues/119709
390-
- class: org.elasticsearch.datastreams.lifecycle.ExplainDataStreamLifecycleIT
391-
method: testExplainLifecycleForIndicesWithErrors
392-
issue: https://github.com/elastic/elasticsearch/issues/126252
393390
- class: org.elasticsearch.xpack.test.rest.XPackRestIT
394391
method: test {p0=transform/transforms_stats/Test get transform stats}
395392
issue: https://github.com/elastic/elasticsearch/issues/126270

0 commit comments

Comments
 (0)