use of org.openkilda.wfm.topology.network.model.RoundTripStatus in project open-kilda by telstra.
the class NetworkIslServiceTest method roundTripDiscoveryOnDestResetPortDownStatus.
@Test
public void roundTripDiscoveryOnDestResetPortDownStatus() {
IslReference reference = preparePortDownStatusReset();
service.roundTripStatusNotification(reference, new RoundTripStatus(reference.getDest(), IslStatus.ACTIVE));
verifyNoMoreInteractions(dashboardLogger);
service.roundTripStatusNotification(reference, new RoundTripStatus(reference.getDest(), IslStatus.ACTIVE));
verify(dashboardLogger).onIslUp(eq(reference), any());
verifyNoMoreInteractions(dashboardLogger);
}
use of org.openkilda.wfm.topology.network.model.RoundTripStatus in project open-kilda by telstra.
the class NetworkIslServiceTest method considerRecoveryAfterRoundTrip.
@Test
public void considerRecoveryAfterRoundTrip() {
setupIslStorageStub();
final IslReference reference = prepareActiveIsl();
service.roundTripStatusNotification(reference, new RoundTripStatus(reference.getSource(), IslStatus.ACTIVE));
service.islDown(reference.getSource(), reference, IslDownReason.POLL_TIMEOUT);
service.islDown(reference.getDest(), reference, IslDownReason.POLL_TIMEOUT);
// still up because of active round trip discovery
verify(dashboardLogger, times(0)).onIslDown(eq(reference), any());
// restore one-way discovery status
service.islUp(reference.getSource(), reference, new IslDataHolder(200L, 200L, 200L));
service.islUp(reference.getDest(), reference, new IslDataHolder(200L, 200L, 200L));
// remove round trip discovery
service.roundTripStatusNotification(reference, new RoundTripStatus(reference.getSource(), IslStatus.INACTIVE));
// must not fail, because of successful discovery notifications
verify(dashboardLogger, times(0)).onIslDown(eq(reference), any());
}
use of org.openkilda.wfm.topology.network.model.RoundTripStatus in project open-kilda by telstra.
the class NetworkIslServiceTest method resurrectOnRoundTripDiscovery.
@Test
public void resurrectOnRoundTripDiscovery() {
IslReference reference = prepareResurrection();
service.roundTripStatusNotification(reference, new RoundTripStatus(reference.getSource(), IslStatus.ACTIVE));
testResurrection(reference, true);
}
use of org.openkilda.wfm.topology.network.model.RoundTripStatus in project open-kilda by telstra.
the class NetworkIslServiceTest method noResurrectOnRoundTripFail.
@Test
public void noResurrectOnRoundTripFail() {
IslReference reference = prepareResurrection();
service.roundTripStatusNotification(reference, new RoundTripStatus(reference.getSource(), IslStatus.INACTIVE));
testResurrection(reference, false);
}
use of org.openkilda.wfm.topology.network.model.RoundTripStatus in project open-kilda by telstra.
the class NetworkIslServiceTest method considerRoundTripDiscovery.
@Test
public void considerRoundTripDiscovery() {
setupIslStorageStub();
final IslReference reference = prepareActiveIsl();
// round trip discovery (one endpoint enough)
service.roundTripStatusNotification(reference, new RoundTripStatus(reference.getSource(), IslStatus.ACTIVE));
service.islDown(reference.getSource(), reference, IslDownReason.POLL_TIMEOUT);
service.islDown(reference.getDest(), reference, IslDownReason.POLL_TIMEOUT);
verify(dashboardLogger, times(0)).onIslDown(eq(reference), any());
// round trip fail/expire
service.roundTripStatusNotification(reference, new RoundTripStatus(reference.getSource(), IslStatus.INACTIVE));
verify(dashboardLogger).onIslDown(eq(reference), any());
}
Aggregations