@@ -494,7 +494,6 @@ public void testSnapshotShutdownProgressTracker() throws Exception {
494
494
final var indexName = randomIdentifier ();
495
495
createIndexWithContent (indexName , indexSettings (numShards , 0 ).put (REQUIRE_NODE_NAME_SETTING , nodeForRemoval ).build ());
496
496
indexAllShardsToAnEqualOrGreaterMinimumSize (indexName , ByteSizeValue .of (2 , ByteSizeUnit .KB ).getBytes ());
497
- logger .info ("---> nodeForRemovalId: " + nodeForRemovalId + ", numShards: " + numShards );
498
497
499
498
// Start the snapshot with blocking in place on the data node not to allow shard snapshots to finish yet.
500
499
final var clusterService = internalCluster ().getCurrentMasterNodeInstance (ClusterService .class );
@@ -504,21 +503,7 @@ public void testSnapshotShutdownProgressTracker() throws Exception {
504
503
505
504
waitForBlock (otherNode , repoName );
506
505
507
- // Block on the master when a shard snapshot request comes in, until we can verify that the Tracker saw the outgoing request.
508
- final CountDownLatch snapshotStatusUpdateLatch = new CountDownLatch (1 );
509
- final var masterTransportService = MockTransportService .getInstance (internalCluster ().getMasterName ());
510
- masterTransportService .addRequestHandlingBehavior (
511
- TransportUpdateSnapshotStatusAction .NAME ,
512
- (handler , request , channel , task ) -> masterTransportService .getThreadPool ().generic ().execute (() -> {
513
- safeAwait (snapshotStatusUpdateLatch );
514
- try {
515
- handler .messageReceived (request , channel , task );
516
- } catch (Exception e ) {
517
- fail (e );
518
- }
519
- })
520
- );
521
-
506
+ logger .info ("---> nodeForRemovalId: " + nodeForRemovalId + ", numShards: " + numShards );
522
507
mockLog .addExpectation (
523
508
new MockLog .SeenEventExpectation (
524
509
"SnapshotShutdownProgressTracker start log message" ,
@@ -566,6 +551,21 @@ public void testSnapshotShutdownProgressTracker() throws Exception {
566
551
mockLog .awaitAllExpectationsMatched ();
567
552
resetMockLog ();
568
553
554
+ // Block on the master when a shard snapshot request comes in, until we can verify that the Tracker saw the outgoing request.
555
+ final CountDownLatch snapshotStatusUpdateLatch = new CountDownLatch (1 );
556
+ final var masterTransportService = MockTransportService .getInstance (internalCluster ().getMasterName ());
557
+ masterTransportService .addRequestHandlingBehavior (
558
+ TransportUpdateSnapshotStatusAction .NAME ,
559
+ (handler , request , channel , task ) -> masterTransportService .getThreadPool ().generic ().execute (() -> {
560
+ safeAwait (snapshotStatusUpdateLatch );
561
+ try {
562
+ handler .messageReceived (request , channel , task );
563
+ } catch (Exception e ) {
564
+ fail (e );
565
+ }
566
+ })
567
+ );
568
+
569
569
mockLog .addExpectation (
570
570
new MockLog .SeenEventExpectation (
571
571
"SnapshotShutdownProgressTracker shard snapshot has paused log message" ,
0 commit comments