Search in sources :

Example 6 with ClusterMembershipEvent

use of com.netflix.titus.api.clustermembership.model.event.ClusterMembershipEvent in project titus-control-plane by Netflix.

the class KubeClusterMembershipConnectorTest method setUp.

@Before
public void setUp() {
    connector = new KubeClusterMembershipConnector(LOCAL_MEMBER_UNREGISTERED, kubeExecutors, kubeExecutors, configuration, titusRuntime);
    connector.membershipChangeEvents().subscribe(connectorEvents);
    // Initial sequence common for all tests
    assertThat(connector.getLocalClusterMemberRevision().getCurrent()).isEqualTo(LOCAL_MEMBER_UNREGISTERED);
    ClusterMembershipEvent snapshotEvent = connectorEvents.takeNext();
    assertThat(snapshotEvent).isInstanceOf(ClusterMembershipSnapshotEvent.class);
}
Also used : ClusterMembershipEvent(com.netflix.titus.api.clustermembership.model.event.ClusterMembershipEvent) Before(org.junit.Before)

Aggregations

ClusterMembershipEvent (com.netflix.titus.api.clustermembership.model.event.ClusterMembershipEvent)6 ClusterMembershipChangeEvent (com.netflix.titus.api.clustermembership.model.event.ClusterMembershipChangeEvent)4 ClusterMember (com.netflix.titus.api.clustermembership.model.ClusterMember)1 LeaderElectionChangeEvent (com.netflix.titus.api.clustermembership.model.event.LeaderElectionChangeEvent)1 ClusterMemberGenerator.activeClusterMember (com.netflix.titus.testkit.model.clustermembership.ClusterMemberGenerator.activeClusterMember)1 Before (org.junit.Before)1