Update ForwardingTest so it won't break for previous L2/L3 split.
@@ -523,6 +523,7 @@ public class ForwardingTest extends FloodlightTestCase {
expect(topology.isEdge(DatapathId.of(2L), OFPort.of(3))).andReturn(true).anyTimes();
// Reset mocks, trigger the packet in, and validate results
+ expect(routingEngine.isL3RoutingEnabled()).andReturn(false).atLeastOnce();
replay(sw1, sw2, routingEngine, topology);
forwarding.receive(sw1, this.packetIn, cntx);
verify(sw1, sw2, routingEngine);
@@ -594,6 +595,7 @@ public class ForwardingTest extends FloodlightTestCase {
expect(topology.isEdge(DatapathId.of(2L), OFPort.of(3))).andReturn(true).anyTimes();
// Reset mocks, trigger the packet in, and validate results
+ expect(routingEngine.isL3RoutingEnabled()).andReturn(false).atLeastOnce();
replay(sw1, sw2, routingEngine, topology);
forwarding.receive(sw1, this.packetInIPv6, cntx);
verify(sw1, sw2, routingEngine);
@@ -662,8 +664,8 @@ public class ForwardingTest extends FloodlightTestCase {
// Reset mocks, trigger the packet in, and validate results
reset(routingEngine);
-// routingEngine.disableL3Routing();
expect(routingEngine.getPath(DatapathId.of(1L), OFPort.of(1), DatapathId.of(1L), OFPort.of(3))).andReturn(route).atLeastOnce();
+ expect(routingEngine.isL3RoutingEnabled()).andReturn(false).atLeastOnce();
replay(sw1, sw2, routingEngine, topology);
forwarding.receive(sw1, this.packetIn, cntx);
verify(sw1, sw2, routingEngine);
@@ -719,6 +721,7 @@ public class ForwardingTest extends FloodlightTestCase {
expect(topology.isEdge(DatapathId.of(1L), OFPort.of(3))).andReturn(true).anyTimes();
// Reset mocks, trigger the packet in, and validate results
+ expect(routingEngine.isL3RoutingEnabled()).andReturn(false).atLeastOnce();
replay(sw1, sw2, routingEngine, topology);
forwarding.receive(sw1, this.packetInIPv6, cntx);
verify(sw1, sw2, routingEngine);
@@ -811,6 +814,7 @@ public class ForwardingTest extends FloodlightTestCase {
.anyTimes();
expect(sw1.hasAttribute(IOFSwitch.PROP_SUPPORTS_OFPP_FLOOD)).andReturn(true).anyTimes();
expect(sw1.write(capture(wc1))).andReturn(true).once();
+ expect(routingEngine.isL3RoutingEnabled()).andReturn(false).atLeastOnce();
replay(sw1, sw2, routingEngine, topology);
forwarding.receive(sw1, this.packetIn, cntx);
verify(sw1, sw2, routingEngine);
@@ -846,6 +850,7 @@ public class ForwardingTest extends FloodlightTestCase {
.andReturn(true).anyTimes();
// Reset XID to expected (dependent on prior unit tests)
expect(sw1.write(capture(wc1))).andReturn(true).once();
+ expect(routingEngine.isL3RoutingEnabled()).andReturn(false).atLeastOnce();
replay(sw1, sw2, routingEngine, topology);
forwarding.receive(sw1, this.packetInIPv6, cntx);
verify(sw1, sw2, routingEngine);
