Correcting or skipping tests 93/25293/4
authorPatrick Brady <pb071s@att.com>
Thu, 30 Nov 2017 22:25:00 +0000 (14:25 -0800)
committerSkip Wonnell <skip@att.com>
Mon, 4 Dec 2017 15:10:07 +0000 (15:10 +0000)
These tests seem to be designed to timeout and fail. The
resulting exception is either caught or put as an expectation of
the test. The tests do not actually test anything and are causing
30 minutes of build delay.

Change-Id: I177839c0f08f2c4bd8895e0626f49476b4ed7e85
Signed-off-by: Patrick Brady <pb071s@att.com>
Issue-ID: APPC-276

appc-config/appc-data-services/provider/src/test/java/org/openecomp/appc/data/services/db/TestConfigResourceNode.java
appc-config/appc-flow-controller/provider/src/test/java/org/openecomp/appc/flow/executor/node/FlowControlDBServiceTest.java
appc-config/appc-flow-controller/provider/src/test/java/org/openecomp/appc/flow/executor/node/FlowControlNodeTest.java
appc-config/appc-flow-controller/provider/src/test/java/org/openecomp/appc/flow/executor/node/TestFlowExecutorNode.java
appc-inbound/appc-artifact-handler/provider/src/test/java/org/openecomp/appc/artifact/handler/dbservices/DBServiceTest.java
appc-inbound/appc-artifact-handler/provider/src/test/java/org/openecomp/appc/artifact/handler/node/ArtifactHandlerNodeTest.java
appc-inbound/appc-design-services/provider/src/test/java/org/openecomp/appc/design/validator/TestDBService.java

index ee4db30..4fe01b3 100644 (file)
@@ -27,6 +27,7 @@ package org.openecomp.appc.data.services.db;
 import java.util.HashMap;
 import java.util.Map;
 import static org.junit.Assert.assertFalse;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.openecomp.appc.data.services.AppcDataServiceConstant;
 import org.openecomp.appc.data.services.node.ConfigResourceNode;
@@ -35,6 +36,7 @@ import org.onap.ccsdk.sli.core.sli.SvcLogicException;
 
 public class TestConfigResourceNode {
 
+    @Ignore("Test is taking 60 seconds")
     @Test(expected = Exception.class)
     public void testgetConfigFileReferenc() throws SvcLogicException {
         SvcLogicContext ctx = new SvcLogicContext();
@@ -44,8 +46,8 @@ public class TestConfigResourceNode {
         dbService.getConfigFileReference(map, ctx);
     }
 
+    @Ignore("Test is taking 60 seconds")
     @Test(expected = Exception.class)
-
     public void testgetTemplate() throws SvcLogicException {
         SvcLogicContext ctx = new SvcLogicContext();
         ctx.setAttribute("test", "test");
@@ -59,6 +61,7 @@ public class TestConfigResourceNode {
 
     }
 
+    @Ignore("Test is taking 60 seconds")
     @Test(expected = Exception.class)
     public void testgetVnfcReference() throws SvcLogicException {
         SvcLogicContext ctx = new SvcLogicContext();
@@ -69,6 +72,7 @@ public class TestConfigResourceNode {
         dbService.getVnfcReference(map, ctx);
     }
 
+    @Ignore("Test is taking 60 seconds")
     @Test(expected = Exception.class)
     public void testgetSmmChainKeyFiles() throws SvcLogicException {
         SvcLogicContext ctx = new SvcLogicContext();
@@ -80,8 +84,8 @@ public class TestConfigResourceNode {
         dbService.getSmmChainKeyFiles(map, ctx);
     }
 
+    @Ignore("Test is taking 60 seconds")
     @Test(expected = Exception.class)
-
     public void testgetDownloadConfigTemplateByVnf() throws SvcLogicException {
         SvcLogicContext ctx = new SvcLogicContext();
         ctx.setAttribute("test", "test");    
@@ -92,6 +96,7 @@ public class TestConfigResourceNode {
 
     }
 
+    @Ignore("Test is taking 60 seconds")
     @Test(expected = Exception.class)
     public void testgetCommonConfigInfo() throws SvcLogicException {
         SvcLogicContext ctx = new SvcLogicContext();
@@ -102,6 +107,7 @@ public class TestConfigResourceNode {
 
     }
 
+    @Ignore("Test is taking 60 seconds")
     @Test(expected = Exception.class)
     public void testupdateUploadConfigss() throws SvcLogicException {
         SvcLogicContext ctx = new SvcLogicContext();
@@ -112,6 +118,7 @@ public class TestConfigResourceNode {
 
     }
 
+    @Ignore("Test is taking 60 seconds")
     @Test(expected = Exception.class)
     public void testgetConfigFilesByVnfVmNCategory() throws SvcLogicException {
         SvcLogicContext ctx = new SvcLogicContext();
@@ -124,6 +131,7 @@ public class TestConfigResourceNode {
         node.getConfigFilesByVnfVmNCategory(inParams, ctx);
     }
 
+    @Ignore("Test is taking 60 seconds")
     @Test(expected = Exception.class)
     public void testsaveConfigTransactionLog() throws SvcLogicException {
         SvcLogicContext ctx = new SvcLogicContext();
@@ -137,6 +145,7 @@ public class TestConfigResourceNode {
 
     }
 
+    @Ignore("Test is taking 60 seconds")
     @Test(expected = Exception.class)
     public void testsaveConfigBlock() throws SvcLogicException {
         SvcLogicContext ctx = new SvcLogicContext();
index fa29773..079f656 100644 (file)
@@ -32,6 +32,7 @@ import java.util.Map;
 \r
 import org.junit.Assert;\r
 import org.junit.Before;\r
+import org.junit.Ignore;\r
 import org.junit.Test;\r
 import org.junit.runner.RunWith;\r
 import org.mockito.Mock;\r
@@ -102,6 +103,7 @@ QueryStatus dblibSvc ;
        }\r
 \r
        \r
+       @Ignore("Test is taking 60 seconds")\r
        @Test(expected=Exception.class)\r
        public final void testGetDesignTimeFlowModel() throws Exception {\r
                SvcLogicContext localContext = new SvcLogicContext();\r
@@ -114,6 +116,7 @@ QueryStatus dblibSvc ;
 \r
        }\r
 \r
+       @Ignore("Test is taking 60 seconds")\r
        @Test(expected=Exception.class)\r
        public final void testLoadSequenceIntoDB() throws SvcLogicException {\r
                  \r
@@ -146,6 +149,7 @@ QueryStatus dblibSvc ;
 \r
        }\r
 \r
+       @Ignore("Test is taking 60 seconds")\r
        @Test(expected=Exception.class)\r
        public final void testGetDependencyInfo() throws SvcLogicException {\r
                SvcLogicContext localContext = new SvcLogicContext();\r
@@ -155,6 +159,7 @@ QueryStatus dblibSvc ;
                \r
        }\r
 \r
+       @Ignore("Test is taking 60 seconds")\r
        @Test(expected=Exception.class)\r
        public final void testGetCapabilitiesData() throws SvcLogicException {\r
                SvcLogicContext localContext = new SvcLogicContext();\r
index 6bb1cb2..e53ec24 100644 (file)
@@ -37,6 +37,7 @@ import org.junit.After;
 import org.junit.AfterClass;\r
 import org.junit.Before;\r
 import org.junit.BeforeClass;\r
+import org.junit.Ignore;\r
 import org.junit.Test;\r
 import org.mockito.Mock;\r
 import org.mockito.Mockito;\r
@@ -64,6 +65,7 @@ public class FlowControlNodeTest {
        {\r
                FlowControlDBService dbservice = FlowControlDBService.initialise();\r
        }\r
+       @Ignore("Test is taking 60 seconds")\r
        @Test(expected=Exception.class)\r
        public final void testProcessFlow() throws Exception {\r
                SvcLogicContext  ctx = new SvcLogicContext();\r
@@ -105,7 +107,8 @@ public class FlowControlNodeTest {
                Whitebox.invokeMethod(f, "getInventoryInfo", ctx, vnfid);\r
                \r
        }\r
-               @Test(expected=Exception.class)\r
+       @Ignore("Test is taking 60 seconds")\r
+       @Test(expected=Exception.class)\r
        public void testprocessFlowSequence() throws Exception \r
        {\r
                Map<String, String> inparams = new HashMap<String,String>();\r
@@ -143,6 +146,7 @@ public class FlowControlNodeTest {
        Whitebox.invokeMethod(f, "collectInputParams",ctx, transaction);\r
        \r
        }\r
+       @Ignore("Test is taking 60 seconds")\r
        @Test(expected=Exception.class)\r
        public void testgetDependencyInfo() throws Exception\r
        {\r
index ba1cd67..45896a4 100644 (file)
@@ -26,6 +26,7 @@ import java.util.HashMap;
 import java.util.Properties;
 
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.openecomp.appc.flow.controller.node.FlowControlNode;
 import org.openecomp.appc.flow.controller.utils.FlowControllerConstants;
@@ -61,6 +62,8 @@ public class TestFlowExecutorNode {
                 }
 
        }
+            
+    @Ignore("Test is taking 60 seconds")
        @Test(expected=Exception.class)
        public void testFlowExecutorNode() throws Exception {
                
index 5ca6ec3..52fe273 100644 (file)
@@ -26,6 +26,7 @@ package org.openecomp.appc.artifact.handler.dbservices;
 
 import java.nio.charset.Charset;
 import org.json.JSONObject;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.openecomp.appc.artifact.handler.utils.SdcArtifactHandlerConstants;
 import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
@@ -43,9 +44,9 @@ public class DBServiceTest {
         dbService.saveArtifacts(ctx, internalVersion);
     }
 
-    @Test(expected = Exception.class)
+    @Test
     public void testSaveArtifactsException() throws Exception {
-        DBService dbService = DBService.initialise();
+        MockDBService dbService = MockDBService.initialise();
         SvcLogicContext ctx = new SvcLogicContext();
         ctx.setAttribute("test", "test");
         int internalVersion = 1;
@@ -62,9 +63,9 @@ public class DBServiceTest {
     }
 
 
-    @Test(expected = Exception.class)
+    @Test
     public void testLogDataException() throws Exception {
-        DBService dbService = DBService.initialise();
+        MockDBService dbService = MockDBService.initialise();
         SvcLogicContext ctx = new SvcLogicContext();
         ctx.setAttribute("test", "test");
         String prefix = "test";
@@ -81,9 +82,9 @@ public class DBServiceTest {
         dbService.processConfigActionDg(ctx, isUpdate);
     }
 
-    @Test(expected = Exception.class)
+    @Test
     public void testProcessConfigActionDgException() throws Exception {
-        DBService dbService = DBService.initialise();
+        MockDBService dbService = MockDBService.initialise();
         SvcLogicContext ctx = new SvcLogicContext();
         ctx.setAttribute("test", "test");
         boolean isUpdate = true;
@@ -100,9 +101,9 @@ public class DBServiceTest {
         dbService.getModelDataInformationbyArtifactName(artifactName);
     }
 
-    @Test(expected = Exception.class)
+    @Test
     public void testGetModelDataInformationbyArtifactNameException() throws Exception {
-        DBService dbService = DBService.initialise();
+        MockDBService dbService = MockDBService.initialise();
         SvcLogicContext ctx = new SvcLogicContext();
         ctx.setAttribute("test", "test");
         String artifactName = "test";
@@ -120,9 +121,9 @@ public class DBServiceTest {
         dbService.updateYangContents(ctx, artifactId, yangContents);
     }
 
-    @Test(expected = Exception.class)
+    @Test
     public void testUpdateYangContentsException() throws Exception {
-        DBService dbService = DBService.initialise();
+        MockDBService dbService = MockDBService.initialise();
         SvcLogicContext ctx = new SvcLogicContext();
         ctx.setAttribute("test", "test");
         String artifactName = "test";
@@ -145,9 +146,9 @@ public class DBServiceTest {
     }
 
 
-    @Test(expected = Exception.class)
+    @Test
     public void testInsertProtocolReferenceException() throws Exception {
-        DBService dbService = DBService.initialise();
+        MockDBService dbService = MockDBService.initialise();
         SvcLogicContext ctx = new SvcLogicContext();
         ctx.setAttribute("test", "test");
         String vnfType = "testVnf";
@@ -167,9 +168,9 @@ public class DBServiceTest {
         dbService.processDownloadDgReference(ctx, isUpdate);
     }
 
-    @Test(expected = Exception.class)
+    @Test
     public void testprocessDpwnloadDGReferenceException() throws Exception {
-        DBService dbService = DBService.initialise();
+        MockDBService dbService = MockDBService.initialise();
         SvcLogicContext ctx = new SvcLogicContext();
         ctx.setAttribute("test", "test");
         boolean isUpdate = true;
@@ -185,9 +186,9 @@ public class DBServiceTest {
         dbService.processVnfcReference(ctx, isUpdate);
     }
 
-    @Test(expected = Exception.class)
+    @Test
     public void testProcessVnfcReferenceException() throws Exception {
-        DBService dbService = DBService.initialise();
+        MockDBService dbService = MockDBService.initialise();
         SvcLogicContext ctx = new SvcLogicContext();
         ctx.setAttribute("test", "test");
         boolean isUpdate = true;
@@ -203,9 +204,9 @@ public class DBServiceTest {
         dbService.processDeviceAuthentication(ctx, isUpdate);
     }
 
-    @Test(expected = Exception.class)
+    @Test
     public void testProcessDeviceAuthenticationException() throws Exception {
-        DBService dbService = DBService.initialise();
+        MockDBService dbService = MockDBService.initialise();
         SvcLogicContext ctx = new SvcLogicContext();
         ctx.setAttribute("test", "test");
         boolean isUpdate = true;
@@ -221,9 +222,9 @@ public class DBServiceTest {
         dbService.processDeviceInterfaceProtocol(ctx, isUpdate);
     }
 
-    @Test(expected = Exception.class)
+    @Test
     public void testProcessDeviceInterfaceProtocolException() throws Exception {
-        DBService dbService = DBService.initialise();
+        MockDBService dbService = MockDBService.initialise();
         SvcLogicContext ctx = new SvcLogicContext();
         ctx.setAttribute("test", "test");
         boolean isUpdate = true;
@@ -240,9 +241,9 @@ public class DBServiceTest {
         dbService.processSdcReferences(ctx, isUpdate);
     }
 
-    @Test(expected = Exception.class)
+    @Ignore
     public void testProcessSdcReferencesException() throws Exception {
-        DBService dbService = DBService.initialise();
+        MockDBService dbService = MockDBService.initialise();
         SvcLogicContext ctx = new SvcLogicContext();
         ctx.setAttribute("test", "test");
         boolean isUpdate = true;
@@ -258,9 +259,9 @@ public class DBServiceTest {
         dbService.isArtifactUpdateRequired(ctx, db);
     }
 
-    @Test(expected = Exception.class)
+    @Test
     public void testIsArtifactUpdateRequiredExcetion() throws Exception {
-        DBService dbService = DBService.initialise();
+        MockDBService dbService = MockDBService.initialise();
         SvcLogicContext ctx = new SvcLogicContext();
         ctx.setAttribute("test", "test");
         String db = "db";
@@ -277,9 +278,9 @@ public class DBServiceTest {
         dbService.getArtifactID(ctx, db);
     }
 
-    @Test(expected = Exception.class)
+    @Test
     public void testgetArtifactIDException() throws Exception {
-        DBService dbService = DBService.initialise();
+        MockDBService dbService = MockDBService.initialise();
         SvcLogicContext ctx = new SvcLogicContext();
         ctx.setAttribute("test", "test");
         String db = "db";
index 895aabe..870c2fa 100644 (file)
@@ -32,6 +32,7 @@ import java.util.Properties;
 import org.apache.commons.io.IOUtils;
 import org.json.JSONObject;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
 import org.powermock.reflect.Whitebox;
@@ -69,6 +70,7 @@ public class ArtifactHandlerNodeTest {
         ah.processArtifact(inParams, ctx);
     }
 
+    @Ignore("Test is taking 60 seconds")
     @Test(expected = Exception.class)
     public void testStoreReferenceData() throws Exception {
         MockArtifactHandlerNode ah = new MockArtifactHandlerNode();
@@ -121,6 +123,7 @@ public class ArtifactHandlerNodeTest {
         assertTrue(true);
     }
 
+    @Ignore("Test is taking 60 seconds")
     @Test(expected = Exception.class)
     public void testGetArtifactIDException() throws Exception {
         ArtifactHandlerNode ah = new ArtifactHandlerNode();
@@ -128,6 +131,7 @@ public class ArtifactHandlerNodeTest {
         Whitebox.invokeMethod(ah, "getArtifactID", yFileName);
     }
 
+    @Ignore("Test is taking 60 seconds")
     @Test(expected = Exception.class)
     public void testStoreUpdateSdcArtifacts() throws Exception {
         ArtifactHandlerNode ah = new ArtifactHandlerNode();
@@ -137,6 +141,7 @@ public class ArtifactHandlerNodeTest {
         Whitebox.invokeMethod(ah, "storeUpdateSdcArtifacts", postData);
     }
 
+    @Ignore("Test is taking 60 seconds")
     @Test(expected = Exception.class)
     public void testUpdateStoreArtifacts() throws Exception {
         MockArtifactHandlerNode ah = new MockArtifactHandlerNode();
@@ -157,6 +162,7 @@ public class ArtifactHandlerNodeTest {
         Whitebox.invokeMethod(ah, "cleanArtifactInstanceData", ctx);
     }
 
+    @Ignore("Test is taking 60 seconds")
     @Test(expected = Exception.class)
     public void testUpdateYangContents() throws Exception {
         MockArtifactHandlerNode ah = new MockArtifactHandlerNode();
index d1a899d..13cc93f 100644 (file)
@@ -31,6 +31,7 @@ import java.util.Enumeration;
 import java.util.Properties;
 import org.apache.commons.io.FileUtils;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.openecomp.appc.design.dbervices.DbService;
 import org.openecomp.appc.design.dbervices.DesignDBService;
@@ -44,6 +45,7 @@ public class TestDBService {
 
     private final org.slf4j.Logger logger = LoggerFactory.getLogger(TestDBService.class);
 
+    @Ignore("Test is taking 60 seconds")
     @Test
     public void testGetDesigns() {
         try {
@@ -54,6 +56,7 @@ public class TestDBService {
         }
     }
 
+    @Ignore("Test is taking 120 seconds")
     @Test
     public void testGetStatus() {
         try {
@@ -67,6 +70,7 @@ public class TestDBService {
         }
     }
 
+    @Ignore("Test is taking 120 seconds")
     @Test
     public void testUploadArtifact() {
         try {
@@ -80,6 +84,7 @@ public class TestDBService {
         }
     }
 
+    @Ignore("Test is taking 120 seconds")
     @Test
     public void testGetArtifact() {
         try {
@@ -93,6 +98,7 @@ public class TestDBService {
         }
     }
 
+    @Ignore("Test is taking 120 seconds")
     @Test
     public void testSetIncart() {
         try {
@@ -106,6 +112,7 @@ public class TestDBService {
         }
     }
 
+    @Ignore("Test is taking 120 seconds")
     @Test
     public void testSetProtocolReference() {
         try {
@@ -119,6 +126,7 @@ public class TestDBService {
         }
     }
 
+    @Ignore("Test is taking 120 seconds")
     @Test
     public void testSetStatus() {
         try {
@@ -132,6 +140,7 @@ public class TestDBService {
         }
     }
 
+    @Ignore("Test is taking 120 seconds")
     @Test
     public void testGetArtifactReference() {
         try {
@@ -145,6 +154,7 @@ public class TestDBService {
         }
     }
 
+    @Ignore("Test is taking 120 seconds")
     @Test
     public void testGetGuiReference() {
         try {