File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
server/src/internalClusterTest/java/org/elasticsearch/snapshots Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -480,7 +480,7 @@ public void testShutdownWhileSuccessInFlight() throws Exception {
480480 )
481481 public void testSnapshotShutdownProgressTracker () throws Exception {
482482 final var repoName = randomIdentifier ();
483- final int numShards = randomIntBetween (1 , 10 );
483+ final int numShards = randomIntBetween (1 , 9 );
484484 createRepository (repoName , "mock" );
485485
486486 // Create another index on another node which will be blocked (remain in state INIT) throughout.
@@ -540,13 +540,14 @@ public void testSnapshotShutdownProgressTracker() throws Exception {
540540 mockLog .awaitAllExpectationsMatched ();
541541 resetMockLog ();
542542
543- assert 1 <= numShards && numShards <= 10 ;
543+ // At least one shard reached the MockRepository's blocking code when waitForBlock was called. However, there's no guarantee that
544+ // the other shards got that far before the shutdown flag was put in place, in which case the other shards may be paused instead.
544545 mockLog .addExpectation (
545546 new MockLog .PatternSeenEventExpectation (
546547 "SnapshotShutdownProgressTracker running number of snapshots" ,
547548 SnapshotShutdownProgressTracker .class .getCanonicalName (),
548549 Level .INFO ,
549- ".+Number shard snapshots running \\ [" + ( numShards < 10 ? " [1-" + numShards + "]" : "([1-9]|10)" ) + " ].+"
550+ ".+Number shard snapshots running \\ [[1-" + numShards + "]].+"
550551 )
551552 );
552553
You can’t perform that action at this time.
0 commit comments