use of org.openkilda.persistence.dummy.FlowDefaults in project open-kilda by telstra.
the class ActionServiceTest method setup.
@Before
public void setup() {
FlowDefaults flowDefaults = new FlowDefaults();
flowDefaults.setPathComputationStrategy(PathComputationStrategy.LATENCY);
dummyFactory = new PersistenceDummyEntityFactory(persistenceManager, flowDefaults);
flowRepository = persistenceManager.getRepositoryFactory().createFlowRepository();
flowStatsRepository = persistenceManager.getRepositoryFactory().createFlowStatsRepository();
featureTogglesRepository = persistenceManager.getRepositoryFactory().createFeatureTogglesRepository();
featureTogglesRepository.add(KildaFeatureToggles.builder().flowLatencyMonitoringReactions(true).build());
createTestSwitch(SRC_SWITCH);
createTestSwitch(DST_SWITCH);
flow = dummyFactory.makeFlow(new FlowEndpoint(SRC_SWITCH, IN_PORT), new FlowEndpoint(DST_SWITCH, OUT_PORT));
service = new ActionService(carrier, persistenceManager, clock, TIMEOUT, THRESHOLD);
}
Aggregations