@Test(timeout = 30000) public void testRejoinMultipleNodes() throws IOException, InterruptedException { useFastFailureDetectionTimeouts(); final Endpoint seedEndpoint = Utils.hostFromParts("127.0.0.1", basePort); final int numNodes = 30; final int failNodes = 5; createCluster(numNodes, seedEndpoint); final ExecutorService executor = Executors.newWorkStealingPool(failNodes); final CountDownLatch latch = new CountDownLatch(failNodes); for (int j = 0; j < failNodes; j++) { final int inc = j; executor.execute(() -> { try { for (int i = 0; i < 3; i++) { final Endpoint leavingEndpoint = Utils.hostFromParts("127.0.0.1", basePort + 1 + inc); final Cluster cluster = instances.remove(leavingEndpoint); try { cluster.shutdown(); waitAndVerifyAgreement(numNodes - failNodes, 20, 500); extendCluster(leavingEndpoint, seedEndpoint); waitAndVerifyAgreement(numNodes, 20, 500); } catch (final InterruptedException e) { fail(); } } } finally { latch.countDown(); } }); } latch.await(); waitAndVerifyAgreement(numNodes, 10, 250); executor.shutdownNow(); }
public void shutdown() { LOG.debug("Shutting down RpcServer and MembershipService"); rpcServer.shutdown(); membershipService.shutdown(); sharedResources.shutdown(); this.hasShutdown = true; }
Cluster { public void shutdown() { LOG.debug("Shutting down RpcServer and MembershipService"); rpcServer.shutdown(); membershipService.shutdown(); sharedResources.shutdown(); this.hasShutdown = true; } }
Cluster { public void shutdown() { LOG.debug("Shutting down RpcServer and MembershipService"); rpcServer.shutdown(); membershipService.shutdown(); sharedResources.shutdown(); this.hasShutdown = true; } private  Cluster(final IMessagingServer rpcServer,
                    final MembershipService membershipService,
                    final SharedResources sharedResources,
                    final Endpoint listenAddress); }
Cluster { public void shutdown() { LOG.debug("Shutting down RpcServer and MembershipService"); rpcServer.shutdown(); membershipService.shutdown(); sharedResources.shutdown(); this.hasShutdown = true; } private  Cluster(final IMessagingServer rpcServer,
                    final MembershipService membershipService,
                    final SharedResources sharedResources,
                    final Endpoint listenAddress); List<Endpoint> getMemberlist(); int getMembershipSize(); Map<Endpoint, Metadata> getClusterMetadata(); void registerSubscription(final ClusterEvents event,
                                     final BiConsumer<Long, List<NodeStatusChange>> callback); void leaveGracefully(); void shutdown(); @Override String toString(); }
Cluster { public void shutdown() { LOG.debug("Shutting down RpcServer and MembershipService"); rpcServer.shutdown(); membershipService.shutdown(); sharedResources.shutdown(); this.hasShutdown = true; } private  Cluster(final IMessagingServer rpcServer,
                    final MembershipService membershipService,
                    final SharedResources sharedResources,
                    final Endpoint listenAddress); List<Endpoint> getMemberlist(); int getMembershipSize(); Map<Endpoint, Metadata> getClusterMetadata(); void registerSubscription(final ClusterEvents event,
                                     final BiConsumer<Long, List<NodeStatusChange>> callback); void leaveGracefully(); void shutdown(); @Override String toString();  }