verify(commitFuture, times(2)).get(); // 1 + 1 above
}
- /**
- * Test method {@link L2ForwardingService#programLocalTableMiss(Long, String, boolean)}
- */
- @Test
- public void testProgramLocalTableMiss() throws Exception {
- l2ForwardingService.programLocalTableMiss(DPID, SEGMENTATION_ID, true);
- verify(writeTransaction, times(2)).put(any(LogicalDatastoreType.class), any(InstanceIdentifier.class), any(Node.class), anyBoolean());
- verify(writeTransaction, times(1)).submit();
- verify(commitFuture, times(1)).get();
-
- l2ForwardingService.programLocalTableMiss(DPID, SEGMENTATION_ID, false);
- verify(writeTransaction, times(1)).delete(any(LogicalDatastoreType.class), any(InstanceIdentifier.class));
- verify(writeTransaction, times(2)).submit();
- verify(commitFuture, times(2)).get(); // 1 + 1 above
- }
-
/**
* Test method {@link L2ForwardingService#programLocalVlanTableMiss(Long, String, boolean)}
*/
verify(commitFuture, times(2)).get(); // 1 + 1 above
}
- /**
- * Test method {@link L2ForwardingService#programVlanFloodOut(Long, String, Long, boolean)}
- */
- @Test
- public void testProgramVlanFloodOut() throws Exception {
- l2ForwardingService.programVlanFloodOut(DPID, SEGMENTATION_ID, ETH_PORT, true);
- verify(writeTransaction, times(2)).put(any(LogicalDatastoreType.class), any(InstanceIdentifier.class), any(Node.class), anyBoolean());
- verify(writeTransaction, times(1)).submit();
- verify(commitFuture, times(1)).get();
-
- l2ForwardingService.programVlanFloodOut(DPID, SEGMENTATION_ID, ETH_PORT, false);
- verify(writeTransaction, times(1)).delete(any(LogicalDatastoreType.class), any(InstanceIdentifier.class));
- verify(writeTransaction, times(2)).submit();
- verify(commitFuture, times(2)).get(); // 1 + 1 above
- }
-
- /**
- * Test method {@link L2ForwardingService#programTunnelMiss(Long, String, boolean)}
- */
- @Test
- public void testProgramTunnelMiss() throws Exception {
- l2ForwardingService.programTunnelMiss(DPID, SEGMENTATION_ID, true);
- verify(writeTransaction, times(2)).put(any(LogicalDatastoreType.class), any(InstanceIdentifier.class), any(Node.class), anyBoolean());
- verify(writeTransaction, times(1)).submit();
- verify(commitFuture, times(1)).get();
-
- l2ForwardingService.programTunnelMiss(DPID, SEGMENTATION_ID, false);
- verify(writeTransaction, times(1)).delete(any(LogicalDatastoreType.class), any(InstanceIdentifier.class));
- verify(writeTransaction, times(2)).submit();
- verify(commitFuture, times(2)).get(); // 1 + 1 above
- }
-
/**
* Test method {@link L2ForwardingService#programVlanMiss(Long, String, Long, boolean)}
*/
@Test
public void testProgramVlanMiss() throws Exception {
- l2ForwardingService.programTunnelMiss(DPID, SEGMENTATION_ID, true);
+ l2ForwardingService.programVlanMiss(DPID, SEGMENTATION_ID, ETH_PORT, true);
verify(writeTransaction, times(2)).put(any(LogicalDatastoreType.class), any(InstanceIdentifier.class), any(Node.class), anyBoolean());
verify(writeTransaction, times(1)).submit();
verify(commitFuture, times(1)).get();
- l2ForwardingService.programTunnelMiss(DPID, SEGMENTATION_ID, false);
+ l2ForwardingService.programVlanMiss(DPID, SEGMENTATION_ID, ETH_PORT, false);
verify(writeTransaction, times(1)).delete(any(LogicalDatastoreType.class), any(InstanceIdentifier.class));
verify(writeTransaction, times(2)).submit();
verify(commitFuture, times(2)).get(); // 1 + 1 above