ONOS-6257: fixing Region-peer-location function...
- corrected UiRegion.isRoot() implementation
- added to/from-compact-strings for LayoutLocation, so we can encode
a list of them in an annotation
- Fixed bug in DistributedRegionStore which was emiting events that
had a null region as subject.
Change-Id: I547e0c7f62385b85b191b8d63e6b569196623b84
diff --git a/web/gui/src/test/java/org/onosproject/ui/impl/topo/model/ModelCacheTest.java b/web/gui/src/test/java/org/onosproject/ui/impl/topo/model/ModelCacheTest.java
index 606756b..8d7ada6 100644
--- a/web/gui/src/test/java/org/onosproject/ui/impl/topo/model/ModelCacheTest.java
+++ b/web/gui/src/test/java/org/onosproject/ui/impl/topo/model/ModelCacheTest.java
@@ -25,23 +25,19 @@
import org.onosproject.net.Host;
import org.onosproject.net.HostId;
import org.onosproject.net.Link;
-import org.onosproject.net.region.Region;
-import org.onosproject.ui.model.topo.UiModelEvent.Type;
import org.onosproject.ui.model.topo.UiClusterMember;
import org.onosproject.ui.model.topo.UiDevice;
import org.onosproject.ui.model.topo.UiDeviceLink;
import org.onosproject.ui.model.topo.UiElement;
import org.onosproject.ui.model.topo.UiHost;
import org.onosproject.ui.model.topo.UiLinkId;
+import org.onosproject.ui.model.topo.UiModelEvent.Type;
import org.onosproject.ui.model.topo.UiRegion;
import java.util.Collection;
import java.util.Iterator;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.*;
import static org.onosproject.cluster.NodeId.nodeId;
import static org.onosproject.net.PortNumber.portNumber;
import static org.onosproject.ui.model.topo.UiLinkId.uiLinkId;
@@ -223,9 +219,6 @@
assertEquals("wrong id", REGION_2.id(), region.id());
assertEquals("unex # device IDs", 3, region.deviceIds().size());
assertContains("missing ID", region.deviceIds(), DEVID_4, DEVID_5, DEVID_6);
- Region r = region.backingRegion();
- print(r);
- assertEquals("wrong region name", "Region-R2", r.name());
}
private static final String[] LINKS_2_7 = {D2, "27", D7, "72"};