aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTschaen, Brendan <ctschaen@att.com>2018-11-05 14:19:19 -0500
committerTschaen, Brendan <ctschaen@att.com>2018-11-05 14:20:27 -0500
commit20cdcbf62622241e431ede98272e08855863342d (patch)
tree3e1970e639b30ea7ff47e5732b7e9336056f9e23
parent33f539c97f75232926009312dee888fc09a45bd0 (diff)
Separate jar, ignore locking unit tests
Change-Id: I9ac45fc4dc93a8dad86ead9676129411ca8a5a26 Issue-ID: MUSIC-148 Signed-off-by: Tschaen, Brendan <ctschaen@att.com>
-rwxr-xr-xpom.xml6
-rw-r--r--src/test/java/org/onap/music/unittests/TestMusicCoreIntegration.java2
-rw-r--r--src/test/java/org/onap/music/unittests/TestRestMusicData.java14
-rw-r--r--src/test/java/org/onap/music/unittests/TestRestMusicQAPI.java8
4 files changed, 22 insertions, 8 deletions
diff --git a/pom.xml b/pom.xml
index 459b5557..55fee8b9 100755
--- a/pom.xml
+++ b/pom.xml
@@ -23,9 +23,9 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.onap.music</groupId>
- <artifactId>MUSIC</artifactId>
+ <artifactId>dev-MUSIC-cassandra</artifactId>
<packaging>war</packaging>
- <version>3.2.0</version>
+ <version>3.2.0-SNAPSHOT</version>
<description>
This is the MUSIC REST interface, packaged as a war file.
</description>
@@ -73,7 +73,7 @@
</repositories>
<build>
- <finalName>MUSIC</finalName>
+ <finalName>dev-MUSIC-cassandra</finalName>
<sourceDirectory>src/main/java</sourceDirectory>
<outputDirectory>src/main/webapp/WEB-INF/classes</outputDirectory>
<testSourceDirectory>src/test/java</testSourceDirectory>
diff --git a/src/test/java/org/onap/music/unittests/TestMusicCoreIntegration.java b/src/test/java/org/onap/music/unittests/TestMusicCoreIntegration.java
index b47c812a..59417f2b 100644
--- a/src/test/java/org/onap/music/unittests/TestMusicCoreIntegration.java
+++ b/src/test/java/org/onap/music/unittests/TestMusicCoreIntegration.java
@@ -26,6 +26,7 @@ import org.apache.curator.test.TestingServer;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.FixMethodOrder;
+import org.junit.Ignore;
import org.junit.Test;
import org.junit.runners.MethodSorters;
import org.onap.music.datastore.PreparedQueryObject;
@@ -42,6 +43,7 @@ import com.datastax.driver.core.ResultSet;
import com.datastax.driver.core.Row;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@Ignore
public class TestMusicCoreIntegration {
static TestingServer zkServer;
diff --git a/src/test/java/org/onap/music/unittests/TestRestMusicData.java b/src/test/java/org/onap/music/unittests/TestRestMusicData.java
index e9435ee1..f0c52a3b 100644
--- a/src/test/java/org/onap/music/unittests/TestRestMusicData.java
+++ b/src/test/java/org/onap/music/unittests/TestRestMusicData.java
@@ -34,6 +34,7 @@ import org.apache.curator.test.TestingServer;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.FixMethodOrder;
+import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.MethodSorters;
@@ -123,8 +124,10 @@ public class TestRestMusicData {
testObject = new PreparedQueryObject();
testObject.appendQueryString("DROP KEYSPACE IF EXISTS admin");
MusicCore.eventualPut(testObject);
- MusicCore.mDstoreHandle.close();
- zkServer.stop();
+ if(MusicCore.mDstoreHandle!=null)
+ MusicCore.mDstoreHandle.close();
+ if(zkServer!=null)
+ zkServer.stop();
}
@Test
@@ -919,6 +922,7 @@ public class TestRestMusicData {
}
// Values
+ @Ignore
@Test
public void Test6_deleteFromTable1() throws Exception {
JsonDelete jsonDelete = new JsonDelete();
@@ -1132,6 +1136,7 @@ public class TestRestMusicData {
assertTrue(resultMap.containsKey("Exception"));
}
+ @Ignore
@Test
public void Test3_createLockReference() throws Exception {
Mockito.doNothing().when(http).addHeader(xLatestVersion, MusicUtil.getVersion());
@@ -1142,6 +1147,7 @@ public class TestRestMusicData {
assertEquals(ResultType.SUCCESS, resultMap.get("status"));
}
+ @Ignore
@Test
public void Test4_accquireLock() throws Exception {
Mockito.doNothing().when(http).addHeader(xLatestVersion, MusicUtil.getVersion());
@@ -1149,13 +1155,15 @@ public class TestRestMusicData {
assertEquals(ResultType.SUCCESS, resultMap.get("status"));
}
+ @Ignore
@Test
public void Test5_currentLockHolder() throws Exception {
Mockito.doNothing().when(http).addHeader(xLatestVersion, MusicUtil.getVersion());
Map<String, Object> resultMap = (Map<String, Object>) lock.currentLockHolder(lockName,"1","1",authorization, null, appName).getEntity();
assertEquals(ResultType.SUCCESS, resultMap.get("status"));
}
-
+
+ @Ignore
@Test
public void Test7_unLock() throws Exception {
Mockito.doNothing().when(http).addHeader(xLatestVersion, MusicUtil.getVersion());
diff --git a/src/test/java/org/onap/music/unittests/TestRestMusicQAPI.java b/src/test/java/org/onap/music/unittests/TestRestMusicQAPI.java
index bdc6558a..a3d3d709 100644
--- a/src/test/java/org/onap/music/unittests/TestRestMusicQAPI.java
+++ b/src/test/java/org/onap/music/unittests/TestRestMusicQAPI.java
@@ -38,6 +38,7 @@ import org.apache.curator.test.TestingServer;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.FixMethodOrder;
+import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.MethodSorters;
@@ -210,8 +211,10 @@ public class TestRestMusicQAPI {
testObject = new PreparedQueryObject();
testObject.appendQueryString("DROP KEYSPACE IF EXISTS admin");
MusicCore.eventualPut(testObject);
- MusicCore.mDstoreHandle.close();
- zkServer.stop();
+ if (MusicCore.mDstoreHandle!=null)
+ MusicCore.mDstoreHandle.close();
+ if (zkServer!=null)
+ zkServer.stop();
}
@@ -786,6 +789,7 @@ public class TestRestMusicQAPI {
// Values
@Test
+ @Ignore
public void Test6_deleteFromQ() throws Exception {
JsonDelete jsonDelete = new JsonDelete();
Map<String, String> consistencyInfo = new HashMap<>();