@Test(timeout = 30000) public void failRandomThirdOfNodes() throws IOException, InterruptedException { useStaticFd = true; final int numNodes = 50; final int numFailingNodes = 16; final Endpoint seedEndpoint = Utils.hostFromParts("127.0.0.1", basePort); createCluster(numNodes, seedEndpoint); verifyCluster(numNodes); final Set<Endpoint> failingNodes = getRandomHosts(numFailingNodes); staticFds.values().forEach(e -> e.addFailedNodes(failingNodes)); failingNodes.forEach(h -> instances.remove(h).shutdown()); waitAndVerifyAgreement(numNodes - failingNodes.size(), 20, 1500); verifyNumClusterInstances(numNodes - failingNodes.size()); }
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();  }