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