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()));
}
Aggregations