Search in sources :

Example 1 with FlowDefaults

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);
}
Also used : FlowEndpoint(org.openkilda.model.FlowEndpoint) PersistenceDummyEntityFactory(org.openkilda.persistence.dummy.PersistenceDummyEntityFactory) FlowDefaults(org.openkilda.persistence.dummy.FlowDefaults) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 FlowEndpoint (org.openkilda.model.FlowEndpoint)1 FlowDefaults (org.openkilda.persistence.dummy.FlowDefaults)1 PersistenceDummyEntityFactory (org.openkilda.persistence.dummy.PersistenceDummyEntityFactory)1