BUG-4340: raise test coverage to 80% - clean disabled tests 78/27278/1
authorJozef Gloncak <jgloncak@cisco.com>
Tue, 22 Sep 2015 13:28:26 +0000 (15:28 +0200)
committerJozef Gloncak <jgloncak@cisco.com>
Tue, 22 Sep 2015 13:28:26 +0000 (15:28 +0200)
 - removed ignored/disabled tests

Change-Id: I971639ec7a1ba195cfa5d6b635d39285c6c1a6db
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/connection/ConnectionManagerImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/device/DeviceStateImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/device/TransactionChainManagerTest.java

index e493a0e5f1129ce35f88a40ae76396160ebb3cf6..24bfad6ee099c5213cbc544ea9b9d724994b5994 100644 (file)
@@ -7,13 +7,11 @@
  */
 package org.opendaylight.openflowplugin.impl.connection;
 
-import static org.junit.Assert.fail;
 import com.google.common.util.concurrent.SettableFuture;
 import java.math.BigInteger;
 import java.net.InetSocketAddress;
 import org.junit.After;
 import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.ArgumentCaptor;
@@ -177,14 +175,4 @@ public class ConnectionManagerImplTest {
 
         Mockito.verify(deviceConnectedHandler, Mockito.timeout(FINAL_STEP_TIMEOUT)).deviceConnected(Matchers.any(ConnectionContext.class));
     }
-
-    /**
-     * Test method for {@link org.opendaylight.openflowplugin.impl.connection.ConnectionManagerImpl#setOpenflowProtocolListener(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OpenflowProtocolListener)}.
-     */
-    @Test
-    @Ignore
-    public void testSetOpenflowProtocolListener() {
-        fail("Not yet implemented");
-    }
-
 }
index 60daad2983721d4cc9e12310b1de3c61bd7512df..1a854dfc00507660a4a796a151afde437f7d8ee1 100644 (file)
@@ -12,7 +12,6 @@ import java.util.Arrays;
 import java.util.List;
 import org.junit.Assert;
 import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Mock;
@@ -73,17 +72,6 @@ public class DeviceStateImplTest {
         new DeviceStateImpl(null, nodeId);
     }
 
-    /**
-     * Test method for {@link DeviceStateImpl#DeviceStateImpl(FeaturesReply, NodeId)}.
-     */
-    @Test(expected=IllegalArgumentException.class)
-    @Ignore // Available for OF1.0 only
-    public void testDeviceStateImplNullPhyPort(){
-        final FeaturesReply emptyFeaturesReply = Mockito.mock(FeaturesReply.class);
-        Mockito.when(emptyFeaturesReply.getPhyPort()).thenReturn(null);
-        new DeviceStateImpl(emptyFeaturesReply, nodeId);
-    }
-
     /**
      * Test method for {@link DeviceStateImpl#getNodeId()}.
      */
index 5bbb2407a6979310375b77053e5ea5bf6aaa5654..ccf18b965e22f02b5e4d9b34bfbde799250ee4e3 100644 (file)
@@ -14,7 +14,6 @@ import com.google.common.util.concurrent.Futures;
 import io.netty.util.HashedWheelTimer;
 import org.junit.After;
 import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Matchers;
@@ -126,33 +125,7 @@ public class TransactionChainManagerTest {
 
         Mockito.verify(txChain).newWriteOnlyTransaction();
         Mockito.verify(writeTx, Mockito.times(2)).put(LogicalDatastoreType.CONFIGURATION, path, data);
-    }
-
-    /**
-     * test of {@link TransactionChainManager#enableSubmit()}: submit - after counter activated
-     *
-     * @throws Exception
-     */
-    @Test
-    @Ignore  // FIXME : think about test -> we don't use submit by time and nrOfOperations
-    public void testEnableCounter2() throws Exception {
-        txChainManager.enableSubmit();
-
-        final Node data = new NodeBuilder().setId(nodeId).build();
-        txChainManager.writeToTransaction(LogicalDatastoreType.CONFIGURATION, path, data);
-        txChainManager.writeToTransaction(LogicalDatastoreType.CONFIGURATION, path, data);
-
-        Mockito.verify(txChain).newWriteOnlyTransaction();
-        Mockito.verify(writeTx, Mockito.times(2)).put(LogicalDatastoreType.CONFIGURATION, path, data);
-        Mockito.verify(writeTx).submit();
-
-        txChainManager.writeToTransaction(LogicalDatastoreType.CONFIGURATION, path, data);
-        txChainManager.writeToTransaction(LogicalDatastoreType.CONFIGURATION, path, data);
-
-        Mockito.verify(txChain, Mockito.times(2)).newWriteOnlyTransaction();
-        Mockito.verify(writeTx, Mockito.times(4)).put(LogicalDatastoreType.CONFIGURATION, path, data);
-        Mockito.verify(writeTx, Mockito.times(2)).submit();
-        Mockito.verify(writeTx, Mockito.times(2)).getIdentifier();
+        Mockito.verify(writeTx, Mockito.never()).submit();
     }
 
     @Test