X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fremoterpc-routingtable%2Fimplementation%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fconnector%2Fremoterpc%2Fimpl%2FRoutingTableImplTest.java;h=50460d4e5ec897892a9a507a1b48244098887c86;hb=672b16286fcf0cdb9c7016e163b1654e12359b33;hp=2ef251d9a1f0a642020b2b5d9299970bdf429189;hpb=d2aed692dab458282c37d42b13a16cff743d598e;p=controller.git diff --git a/opendaylight/md-sal/remoterpc-routingtable/implementation/src/test/java/org/opendaylight/controller/sal/connector/remoterpc/impl/RoutingTableImplTest.java b/opendaylight/md-sal/remoterpc-routingtable/implementation/src/test/java/org/opendaylight/controller/sal/connector/remoterpc/impl/RoutingTableImplTest.java index 2ef251d9a1..50460d4e5e 100644 --- a/opendaylight/md-sal/remoterpc-routingtable/implementation/src/test/java/org/opendaylight/controller/sal/connector/remoterpc/impl/RoutingTableImplTest.java +++ b/opendaylight/md-sal/remoterpc-routingtable/implementation/src/test/java/org/opendaylight/controller/sal/connector/remoterpc/impl/RoutingTableImplTest.java @@ -21,6 +21,7 @@ import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier; import java.net.URI; import java.util.EnumSet; import java.util.HashSet; +import java.util.Iterator; import java.util.Set; import java.util.concurrent.ConcurrentMap; @@ -80,8 +81,7 @@ public class RoutingTableImplTest { rti.addGlobalRoute(routeIdentifier, "172.27.12.1:5000"); - Set globalService = new HashSet(); - globalService.add("172.27.12.1:5000"); + String globalService = "172.27.12.1:5000"; when(concurrentMap.get(routeIdentifier)).thenReturn(globalService); ConcurrentMap latestCache = rti.getRoutingTableCache(); @@ -92,9 +92,10 @@ public class RoutingTableImplTest { Assert.assertEquals(servicesGlobal.size(),1); - - Assert.assertEquals(servicesGlobal.iterator().next(),"172.27.12.1:5000"); - + Iterator iterator = servicesGlobal.iterator(); + while(iterator.hasNext()){ + Assert.assertEquals(iterator.next(),"172.27.12.1:5000"); + } } @@ -124,8 +125,7 @@ public class RoutingTableImplTest { rti.addGlobalRoute(routeIdentifier, "172.27.12.1:5000"); - Set globalService = new HashSet(); - globalService.add("172.27.12.1:5000"); + String globalService = "172.27.12.1:5000"; when(concurrentMap.get(routeIdentifier)).thenReturn(globalService); ConcurrentMap latestCache = rti.getRoutingTableCache();