Skip to content
Snippets Groups Projects
Commit ede7e023 authored by Alex Reimers's avatar Alex Reimers
Browse files

Fixed static flow entry pusher test.

parent 892d3d1f
No related branches found
No related tags found
No related merge requests found
......@@ -170,7 +170,9 @@ public class StaticFlowEntryPusher
*
*/
public void addEntry(long dpid, String name, boolean active, OFFlowMod fm) {
log.debug("addEntry: add dpid: {}, name: {}", dpid, name);
if (log.isDebugEnabled()) {
log.debug("addEntry: add dpid: {}, name: {}", dpid, name);
}
/*
* For now, we do not add inactive flow-mods since they will need to be added again
......
......@@ -12,8 +12,12 @@ import java.util.List;
import java.util.Map;
import net.floodlightcontroller.core.FloodlightContext;
import net.floodlightcontroller.core.IFloodlightProviderService;
import net.floodlightcontroller.core.IOFSwitch;
import net.floodlightcontroller.core.module.FloodlightModuleContext;
import net.floodlightcontroller.core.test.MockFloodlightProvider;
import net.floodlightcontroller.restserver.IRestApiService;
import net.floodlightcontroller.restserver.RestApiServer;
import net.floodlightcontroller.staticflowentry.StaticFlowEntryPusher;
import net.floodlightcontroller.test.FloodlightTestCase;
......@@ -48,11 +52,16 @@ public class StaticFlowEntryPusherTest extends FloodlightTestCase {
"\"active\": \"true\", " +
"\"actions\": \"output=3\"}";
FloodlightModuleContext fmc = new FloodlightModuleContext();
fmc.addService(IFloodlightProviderService.class, getMockFloodlightProvider());
RestApiServer restApi = new RestApiServer();
fmc.addService(IRestApiService.class, restApi);
staticFlowEntryPusher = new StaticFlowEntryPusher();
staticFlowEntryPusher.floodlightProvider =
getMockFloodlightProvider();
staticFlowEntryPusher.init(fmc);
restApi.init(fmc);
staticFlowEntryPusher.setFlowPushTime(200);
staticFlowEntryPusher.startUp(null);
staticFlowEntryPusher.startUp(fmc);
restApi.startUp(fmc);
}
@Test
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment