@Test(timeout = 30_000) public void testMemberUpdate() { Iterator<ClusterMembershipSnapshot> eventIterator = resolver.resolve().toIterable().iterator(); eventIterator.next(); long initialRevision = MEMBER_1.getRevision(); long nextRevision = initialRevision + 1; memberResolver1.addMembers(MEMBER_1.toBuilder().withRevision(nextRevision).build()); ClusterMembershipSnapshot nextEvent = eventIterator.next(); assertThat(nextEvent.getMemberRevisions().get(MEMBER_1.getCurrent().getMemberId()).getRevision()).isEqualTo(nextRevision); }
@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();  }