diff --git a/muted-tests.yml b/muted-tests.yml index 5b511dfacd899..e1612b941fc06 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -417,9 +417,6 @@ tests: - class: org.elasticsearch.action.admin.indices.diskusage.IndexDiskUsageAnalyzerTests method: testKnnVectors issue: https://github.com/elastic/elasticsearch/issues/127689 -- class: org.elasticsearch.snapshots.SnapshotShutdownIT - method: testSnapshotShutdownProgressTracker - issue: https://github.com/elastic/elasticsearch/issues/127690 - class: org.elasticsearch.backwards.MixedClusterClientYamlTestSuiteIT method: test {p0=search/350_point_in_time/point-in-time with index filter} issue: https://github.com/elastic/elasticsearch/issues/127741 diff --git a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/SnapshotShutdownIT.java b/server/src/internalClusterTest/java/org/elasticsearch/snapshots/SnapshotShutdownIT.java index 26e44ab0e6777..c1d9977993b49 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/SnapshotShutdownIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/snapshots/SnapshotShutdownIT.java @@ -480,7 +480,7 @@ public void testShutdownWhileSuccessInFlight() throws Exception { ) public void testSnapshotShutdownProgressTracker() throws Exception { final var repoName = randomIdentifier(); - final int numShards = randomIntBetween(1, 10); + final int numShards = randomIntBetween(1, 9); createRepository(repoName, "mock"); // Create another index on another node which will be blocked (remain in state INIT) throughout. @@ -540,12 +540,14 @@ public void testSnapshotShutdownProgressTracker() throws Exception { mockLog.awaitAllExpectationsMatched(); resetMockLog(); + // At least one shard reached the MockRepository's blocking code when waitForBlock was called. However, there's no guarantee that + // the other shards got that far before the shutdown flag was put in place, in which case the other shards may be paused instead. mockLog.addExpectation( - new MockLog.SeenEventExpectation( + new MockLog.PatternSeenEventExpectation( "SnapshotShutdownProgressTracker running number of snapshots", SnapshotShutdownProgressTracker.class.getCanonicalName(), Level.INFO, - "*Number shard snapshots running [" + numShards + "].*" + ".+Number shard snapshots running \\[[1-" + numShards + "]].+" ) );