Skip to content

Commit 3370c84

Browse files
start node connections service
1 parent e7444b3 commit 3370c84

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

server/src/test/java/org/elasticsearch/snapshots/SnapshotResiliencyTests.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ public void verifyReposThenStopServices() {
267267
final AtomicBoolean cleanedUp = new AtomicBoolean(false);
268268
continueOrDie(cleanupResponse, r -> cleanedUp.set(true));
269269

270-
runUntil(cleanedUp::get, TimeUnit.MINUTES.toMillis(5L));
270+
runUntil(cleanedUp::get, TimeUnit.MINUTES.toMillis(1L));
271271

272272
if (blobStoreContext != null) {
273273
blobStoreContext.forceConsistent();
@@ -1193,6 +1193,8 @@ private final class TestClusterNode {
11931193

11941194
private final ClusterService clusterService;
11951195

1196+
private final NodeConnectionsService nodeConnectionsService;
1197+
11961198
private final RepositoriesService repositoriesService;
11971199

11981200
private final SnapshotsService snapshotsService;
@@ -1344,6 +1346,8 @@ public void onFailure(final Exception e) {
13441346
new BatchedRerouteService(clusterService, allocationService::reroute),
13451347
threadPool
13461348
);
1349+
nodeConnectionsService =
1350+
new NodeConnectionsService(clusterService.getSettings(), threadPool, transportService);
13471351
@SuppressWarnings("rawtypes")
13481352
Map<ActionType, TransportAction> actions = new HashMap<>();
13491353
actions.put(GlobalCheckpointSyncAction.TYPE,
@@ -1521,10 +1525,9 @@ public void start(ClusterState initialState) {
15211525
new BatchedRerouteService(clusterService, allocationService::reroute), ElectionStrategy.DEFAULT_INSTANCE);
15221526
masterService.setClusterStatePublisher(coordinator);
15231527
coordinator.start();
1524-
masterService.start();
1525-
clusterService.getClusterApplierService().setNodeConnectionsService(
1526-
new NodeConnectionsService(clusterService.getSettings(), threadPool, transportService));
1527-
clusterService.getClusterApplierService().start();
1528+
clusterService.getClusterApplierService().setNodeConnectionsService(nodeConnectionsService);
1529+
nodeConnectionsService.start();
1530+
clusterService.start();
15281531
indicesService.start();
15291532
indicesClusterStateService.start();
15301533
coordinator.startInitialJoin();

0 commit comments

Comments
 (0)