minor fixes to DeviceProviderTest
Change-Id: I381b85beced2bdca2029700dacd95c9b792d15df
Showing
1 changed file
with
4 additions
and
3 deletions
... | @@ -115,6 +115,7 @@ public class OpenFlowDeviceProviderTest { | ... | @@ -115,6 +115,7 @@ public class OpenFlowDeviceProviderTest { |
115 | .setDesc(PD3) | 115 | .setDesc(PD3) |
116 | .build(); | 116 | .build(); |
117 | controller.listener.portChanged(DPID1, stat); | 117 | controller.listener.portChanged(DPID1, stat); |
118 | + assertNotNull("never went throught the provider service", registry.descr); | ||
118 | assertEquals("port status unhandled", 3, registry.ports.get(DID1).size()); | 119 | assertEquals("port status unhandled", 3, registry.ports.get(DID1).size()); |
119 | } | 120 | } |
120 | 121 | ||
... | @@ -129,6 +130,7 @@ public class OpenFlowDeviceProviderTest { | ... | @@ -129,6 +130,7 @@ public class OpenFlowDeviceProviderTest { |
129 | DeviceProvider provider; | 130 | DeviceProvider provider; |
130 | Set<DeviceId> connected = new HashSet<DeviceId>(); | 131 | Set<DeviceId> connected = new HashSet<DeviceId>(); |
131 | Multimap<DeviceId, PortDescription> ports = HashMultimap.create(); | 132 | Multimap<DeviceId, PortDescription> ports = HashMultimap.create(); |
133 | + PortDescription descr = null; | ||
132 | 134 | ||
133 | @Override | 135 | @Override |
134 | public DeviceProviderService register(DeviceProvider provider) { | 136 | public DeviceProviderService register(DeviceProvider provider) { |
... | @@ -175,9 +177,8 @@ public class OpenFlowDeviceProviderTest { | ... | @@ -175,9 +177,8 @@ public class OpenFlowDeviceProviderTest { |
175 | @Override | 177 | @Override |
176 | public void portStatusChanged(DeviceId deviceId, | 178 | public void portStatusChanged(DeviceId deviceId, |
177 | PortDescription portDescription) { | 179 | PortDescription portDescription) { |
178 | - System.err.println(deviceId + ":" + portDescription.toString()); | 180 | + ports.put(deviceId, portDescription); |
179 | - | 181 | + descr = portDescription; |
180 | - System.err.println(ports.put(deviceId, portDescription)); | ||
181 | } | 182 | } |
182 | 183 | ||
183 | } | 184 | } | ... | ... |
-
Please register or login to post a comment