[VOL-4695] Remove only EAPOL flow on port disable
Change-Id: I4b4921eeea7d407fdca4cb2b86b457ec6a93258a
diff --git a/impl/src/test/java/org/opencord/olt/impl/OltFlowServiceTest.java b/impl/src/test/java/org/opencord/olt/impl/OltFlowServiceTest.java
index 1525bcd..4196f57 100644
--- a/impl/src/test/java/org/opencord/olt/impl/OltFlowServiceTest.java
+++ b/impl/src/test/java/org/opencord/olt/impl/OltFlowServiceTest.java
@@ -113,6 +113,8 @@
public static final String PORT_3 = "port-3";
private OltFlowService component;
private OltFlowService oltFlowService;
+
+ private DeviceService deviceService;
OltFlowService.InternalFlowListener internalFlowListener;
private final ApplicationId testAppId = new DefaultApplicationId(1, "org.opencord.olt.test");
private final short eapolDefaultVlan = 4091;
@@ -192,6 +194,7 @@
internalFlowListener = spy(component.internalFlowListener);
oltFlowService = spy(component);
+ deviceService = Mockito.mock(DeviceService.class);
}
@After
@@ -908,6 +911,7 @@
// first test that when we remove the EAPOL flow we return false so that the
// subscriber is not removed from the queue
+ doReturn(null).when(deviceService).getPort(any());
doReturn(true).when(oltFlowService).areSubscriberFlowsPendingRemoval(any(), any(), eq(true));
boolean res = oltFlowService.removeSubscriberFlows(sub, DEFAULT_BP_ID_DEFAULT, DEFAULT_MCAST_SERVICE_NAME);
verify(oltFlowService, times(1))