Search in sources :

Example 1 with OFELinkBoltState

use of org.openkilda.messaging.ctrl.state.OFELinkBoltState in project open-kilda by telstra.

the class StormTopologyLCM method allStormTopologiesInTheSameState.

/**
 * We compare old inner state of cache bolt and OFELinkBolt with new state after reload
 * topologies.
 */
@And("^all storm topologies in the same state$")
public void allStormTopologiesInTheSameState() throws Throwable {
    DumpStateManager actualSateDumpsFromBolts = kafkaUtils.getStateDumpsFromBolts();
    // CacheBolt part
    Set<ImmutablePair<Flow, Flow>> actualCacheBoltFlows = actualSateDumpsFromBolts.getCacheBoltState().getFlowDump().getFlows();
    Set<ImmutablePair<Flow, Flow>> expectedCacheBoltFlows = expectedStateDumpsFromBolts.getCacheBoltState().getFlowDump().getFlows();
    assertTrue(CollectionUtils.isEqualCollection(actualCacheBoltFlows, expectedCacheBoltFlows));
    // OFELinkBolt
    OFELinkBoltState actualOfeLinkBoltState = actualSateDumpsFromBolts.getOfeLinkBoltState();
    OFELinkBoltState expectedOfeLinkBoltState = expectedStateDumpsFromBolts.getOfeLinkBoltState();
    assertTrue(CollectionUtils.isEqualCollection(expectedOfeLinkBoltState.getDiscovery(), actualOfeLinkBoltState.getDiscovery()));
}
Also used : DumpStateManager(org.openkilda.messaging.ctrl.state.visitor.DumpStateManager) OFELinkBoltState(org.openkilda.messaging.ctrl.state.OFELinkBoltState) ImmutablePair(org.openkilda.messaging.model.ImmutablePair) And(cucumber.api.java.en.And)

Aggregations

And (cucumber.api.java.en.And)1 OFELinkBoltState (org.openkilda.messaging.ctrl.state.OFELinkBoltState)1 DumpStateManager (org.openkilda.messaging.ctrl.state.visitor.DumpStateManager)1 ImmutablePair (org.openkilda.messaging.model.ImmutablePair)1