Skip to content
Snippets Groups Projects
Commit 552bf85d authored by Gregor Maier's avatar Gregor Maier
Browse files

Merge remote-tracking branch 'floodlight/master' into addrspace

parents ddc1e381 c813d418
No related branches found
No related tags found
No related merge requests found
...@@ -522,7 +522,7 @@ public class LinkDiscoveryManager ...@@ -522,7 +522,7 @@ public class LinkDiscoveryManager
OFPhysicalPort physicalPort = remoteSwitch.getPort(remotePort); OFPhysicalPort physicalPort = remoteSwitch.getPort(remotePort);
int srcPortState = (physicalPort != null) ? physicalPort.getState() : 0; int srcPortState = (physicalPort != null) ? physicalPort.getState() : 0;
physicalPort = sw.getPort(remotePort); physicalPort = sw.getPort(pi.getInPort());
int dstPortState = (physicalPort != null) ? physicalPort.getState() : 0; int dstPortState = (physicalPort != null) ? physicalPort.getState() : 0;
// Store the time of update to this link, and push it out to routingEngine // Store the time of update to this link, and push it out to routingEngine
......
...@@ -1158,17 +1158,17 @@ public class ControllerTest extends FloodlightTestCase { ...@@ -1158,17 +1158,17 @@ public class ControllerTest extends FloodlightTestCase {
*/ */
@Test @Test
public void testRemoveActiveSwitch() { public void testRemoveActiveSwitch() {
IOFSwitch sw = EasyMock.createNiceMock(IOFSwitch.class); IOFSwitch sw = EasyMock.createNiceMock(IOFSwitch.class);
boolean exceptionThrown = false; boolean exceptionThrown = false;
expect(sw.getId()).andReturn(1L).anyTimes(); expect(sw.getId()).andReturn(1L).anyTimes();
replay(sw); replay(sw);
getController().activeSwitches.put(sw.getId(), sw); getController().activeSwitches.put(sw.getId(), sw);
try { try {
getController().getSwitches().remove(1L); getController().getSwitches().remove(1L);
} catch (UnsupportedOperationException e) { } catch (UnsupportedOperationException e) {
exceptionThrown = true; exceptionThrown = true;
} }
assertTrue(exceptionThrown); assertTrue(exceptionThrown);
verify(sw); verify(sw);
} }
} }
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