aboutsummaryrefslogtreecommitdiffstats
path: root/music-core/src/main
diff options
context:
space:
mode:
authorGadicherla, Shiva <sg592n@att.com>2019-12-04 21:52:39 +0000
committerGadicherla, Shiva <sg592n@att.com>2019-12-04 21:57:12 +0000
commit9277729f6cd6fdc0313b98d303fddff2ca8a63af (patch)
treec98e5cb715d20f2be8a1f0f18626c78bdc484cbc /music-core/src/main
parentf85d0e6b4c429f66896d3dbf06b01653bc2d410b (diff)
Unit test cases for DeadLockDetectionUtil, CipherUtil and CassaLockStore
Issue-ID: MUSIC-521 Signed-off-by: Gadicherla, Shiva <sg592n@att.com> Change-Id: I8544a2003548eff9d26c48f65e5109154924bfe9
Diffstat (limited to 'music-core/src/main')
-rw-r--r--music-core/src/main/java/org/onap/music/lockingservice/cassandra/CassaLockStore.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/music-core/src/main/java/org/onap/music/lockingservice/cassandra/CassaLockStore.java b/music-core/src/main/java/org/onap/music/lockingservice/cassandra/CassaLockStore.java
index edce3fff..6a68b81c 100644
--- a/music-core/src/main/java/org/onap/music/lockingservice/cassandra/CassaLockStore.java
+++ b/music-core/src/main/java/org/onap/music/lockingservice/cassandra/CassaLockStore.java
@@ -478,7 +478,7 @@ public class CassaLockStore {
queryObject.appendQueryString(" WHERE lockType = ? ALLOW FILTERING");
queryObject.addValue(LockType.WRITE);
- DeadlockDetectionUtil ddu = new DeadlockDetectionUtil();
+ DeadlockDetectionUtil ddu = getDeadlockDetectionUtil();
ResultSet rs = dsHandle.executeLocalQuorumConsistencyGet(queryObject);
logger.debug("rs has " + rs.getAvailableWithoutFetching() + (rs.isFullyFetched()?"":" (or more!)") );
@@ -493,6 +493,14 @@ public class CassaLockStore {
return deadlock;
}
+ /**
+ * This is used for testing purpose
+ * @return new DeadlockDetectionUtil object
+ */
+ DeadlockDetectionUtil getDeadlockDetectionUtil() {
+ return new DeadlockDetectionUtil();
+ }
+
public List<String> getAllLocksForOwner(String ownerId, String keyspace, String table) throws MusicServiceException, MusicQueryException {
List<String> toRet = new ArrayList<String>();
String lockTable = table_prepend_name + table;