Search in sources :

Example 1 with ReplicaInfo

use of org.onosproject.store.flow.ReplicaInfo in project onos by opennetworkinglab.

the class ReplicaInfoManagerTest method testGetReplicaInfoFor.

@Test
public void testGetReplicaInfoFor() {
    ReplicaInfo info1 = service.getReplicaInfoFor(DID1);
    assertEquals(Optional.of(NID1), info1.master());
    // backups are always empty for now
    assertEquals(Collections.emptyList(), info1.backups());
    ReplicaInfo info2 = service.getReplicaInfoFor(DID2);
    assertEquals("There's no master", Optional.empty(), info2.master());
    // backups are always empty for now
    assertEquals(Collections.emptyList(), info2.backups());
}
Also used : ReplicaInfo(org.onosproject.store.flow.ReplicaInfo) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 ReplicaInfo (org.onosproject.store.flow.ReplicaInfo)1