Fix for ONOS-5034
Change-Id: I61158511680851be375b93c365fc32c0573e9edc
diff --git a/core/net/src/test/java/org/onosproject/net/host/impl/HostManagerTest.java b/core/net/src/test/java/org/onosproject/net/host/impl/HostManagerTest.java
index 1eb014f..6a71f43 100644
--- a/core/net/src/test/java/org/onosproject/net/host/impl/HostManagerTest.java
+++ b/core/net/src/test/java/org/onosproject/net/host/impl/HostManagerTest.java
@@ -91,6 +91,17 @@
private static final HostLocation LOC1 = new HostLocation(DID1, P1, 123L);
private static final HostLocation LOC2 = new HostLocation(DID1, P2, 123L);
+ public static final ComponentContextAdapter REMOVE_DUPS_MONITOR = new ComponentContextAdapter() {
+ @Override
+ public Dictionary getProperties() {
+ Hashtable<String, String> props = new Hashtable<String, String>();
+ props.put("allowDuplicateIps", "true");
+ props.put("monitorHosts", "true");
+ props.put("probeRate", "40000");
+ return props;
+ }
+ };
+
private HostManager mgr;
protected TestListener listener = new TestListener();
@@ -98,16 +109,6 @@
protected TestHostProvider provider;
protected HostProviderService providerService;
- private static final ComponentContextAdapter REMOVE_DUPS =
- new ComponentContextAdapter() {
- @Override
- public Dictionary getProperties() {
- Hashtable<String, String> props = new Hashtable<>();
- props.put("allowDuplicateIps", "true");
- return props;
- }
- };
-
@Before
public void setUp() {
mgr = new HostManager();
@@ -116,7 +117,9 @@
registry = mgr;
mgr.networkConfigService = new TestNetworkConfigService();
mgr.cfgService = new ComponentConfigAdapter();
- mgr.activate(REMOVE_DUPS);
+
+ mgr.activate(REMOVE_DUPS_MONITOR);
+
mgr.addListener(listener);
provider = new TestHostProvider();