@Test(timeout = 30000) public void testRejoinSingleNodeSameConfiguration() throws IOException, InterruptedException { useShortJoinTimeouts(); useFastFailureDetectionTimeouts(); final Endpoint seedEndpoint = Utils.hostFromParts("127.0.0.1", basePort); final Endpoint rejoiningEndpoint = Utils.hostFromParts("127.0.0.1", basePort + 1); createCluster(10, seedEndpoint); Cluster cluster = null; try { cluster = instances.remove(rejoiningEndpoint); assertEquals(9, instances.size()); cluster.shutdown(); try { buildCluster(rejoiningEndpoint).join(seedEndpoint); fail(); } catch (final Cluster.JoinException ignored) { } waitAndVerifyAgreement(9, 10, 1000); cluster = buildCluster(rejoiningEndpoint).join(seedEndpoint); waitAndVerifyAgreement(10, 10, 500); } finally { if (cluster != null) { cluster.shutdown(); } } }
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();  }