@Test(timeout = 30_000) public void testMemberRemoval() { Iterator<ClusterMembershipSnapshot> eventIterator = resolver.resolve().toIterable().iterator(); eventIterator.next(); memberResolver1.removeMembers(MEMBER_2.getCurrent().getMemberId()); memberResolver2.changeHealth(false); ClusterMembershipSnapshot nextEvent = eventIterator.next(); assertThat(nextEvent.getMemberRevisions()).hasSize(1); }
@Override public Flux<ClusterMembershipSnapshot> resolve() { return snapshotEventObservable; }
MultiNodeClusterMemberResolver implements ClusterMemberResolver { @Override public Flux<ClusterMembershipSnapshot> resolve() { return snapshotEventObservable; } }
MultiNodeClusterMemberResolver implements ClusterMemberResolver { @Override public Flux<ClusterMembershipSnapshot> resolve() { return snapshotEventObservable; } MultiNodeClusterMemberResolver(String serviceName,
                                          ClusterMembershipResolverConfiguration configuration,
                                          Supplier<Set<ClusterMemberAddress>> seedAddressesProvider,
                                          Function<ClusterMemberAddress, DirectClusterMemberResolver> directResolverFactory,
                                          Function<ClusterMember, ClusterMemberAddress> addressSelector,
                                          TitusRuntime titusRuntime); }
MultiNodeClusterMemberResolver implements ClusterMemberResolver { @Override public Flux<ClusterMembershipSnapshot> resolve() { return snapshotEventObservable; } MultiNodeClusterMemberResolver(String serviceName,
                                          ClusterMembershipResolverConfiguration configuration,
                                          Supplier<Set<ClusterMemberAddress>> seedAddressesProvider,
                                          Function<ClusterMemberAddress, DirectClusterMemberResolver> directResolverFactory,
                                          Function<ClusterMember, ClusterMemberAddress> addressSelector,
                                          TitusRuntime titusRuntime); @Override void close(); @Override ClusterMembershipSnapshot getSnapshot(); @Override Flux<ClusterMembershipSnapshot> resolve(); }
MultiNodeClusterMemberResolver implements ClusterMemberResolver { @Override public Flux<ClusterMembershipSnapshot> resolve() { return snapshotEventObservable; } MultiNodeClusterMemberResolver(String serviceName,
                                          ClusterMembershipResolverConfiguration configuration,
                                          Supplier<Set<ClusterMemberAddress>> seedAddressesProvider,
                                          Function<ClusterMemberAddress, DirectClusterMemberResolver> directResolverFactory,
                                          Function<ClusterMember, ClusterMemberAddress> addressSelector,
                                          TitusRuntime titusRuntime); @Override void close(); @Override ClusterMembershipSnapshot getSnapshot(); @Override Flux<ClusterMembershipSnapshot> resolve();  }