X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fhosttracker%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fhosttracker%2FHostTrackerTest.java;fp=opendaylight%2Fhosttracker%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fhosttracker%2FHostTrackerTest.java;h=0000000000000000000000000000000000000000;hb=9e43cfabdc83df4c5db51ce6e22e0cecca12aa9a;hp=482e0645b686ea0bb7890211c95eadd66aa8a790;hpb=1bad1b7ca9a87f9e1d32cfcf5a181354fc378ad4;p=controller.git diff --git a/opendaylight/hosttracker/src/test/java/org/opendaylight/controller/hosttracker/HostTrackerTest.java b/opendaylight/hosttracker/src/test/java/org/opendaylight/controller/hosttracker/HostTrackerTest.java deleted file mode 100644 index 482e0645b6..0000000000 --- a/opendaylight/hosttracker/src/test/java/org/opendaylight/controller/hosttracker/HostTrackerTest.java +++ /dev/null @@ -1,59 +0,0 @@ - -/* - * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ - -package org.opendaylight.controller.hosttracker; - - -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.Future; - -import org.junit.Assert; -import org.junit.Test; - -import junit.framework.TestCase; -import org.opendaylight.controller.hosttracker.hostAware.HostNodeConnector; - -public class HostTrackerTest extends TestCase { - - @Test - public void testHostTrackerCallable() throws UnknownHostException { - - HostTracker hostTracker = null; - hostTracker = new HostTracker(); - Assert.assertFalse(hostTracker== null); - - InetAddress hostIP = InetAddress.getByName("192.168.0.8"); - - HostTrackerCallable htCallable = new HostTrackerCallable (hostTracker, hostIP); - Assert.assertTrue(htCallable.trackedHost.equals(hostIP)); - Assert.assertTrue(htCallable.hostTracker.equals(hostTracker)); - - long count = htCallable.latch.getCount(); - htCallable.wakeup(); - Assert.assertTrue(htCallable.latch.getCount() == --count ); - } - - - - @Test - public void testHostTracker() throws UnknownHostException { - HostTracker hostTracker = null; - hostTracker = new HostTracker(); - Assert.assertFalse(hostTracker== null); - - InetAddress hostIP_1 = InetAddress.getByName("192.168.0.8"); - InetAddress hostIP_2 = InetAddress.getByName("192.168.0.18"); - Future dschost = hostTracker.discoverHost(hostIP_1); - dschost = hostTracker.discoverHost(hostIP_2); - hostTracker.nonClusterObjectCreate(); - } - - -}