aboutsummaryrefslogtreecommitdiffstats
path: root/integrity-monitor/src/test/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'integrity-monitor/src/test/java/org')
-rw-r--r--integrity-monitor/src/test/java/org/openecomp/policy/common/im/test/IntegrityMonitorTest.java13
-rw-r--r--integrity-monitor/src/test/java/org/openecomp/policy/common/im/test/StateManagementEntityTest.java4
-rw-r--r--integrity-monitor/src/test/java/org/openecomp/policy/common/im/test/StateManagementTest.java22
-rw-r--r--integrity-monitor/src/test/java/org/openecomp/policy/common/im/test/StateTransitionTest.java17
4 files changed, 5 insertions, 51 deletions
diff --git a/integrity-monitor/src/test/java/org/openecomp/policy/common/im/test/IntegrityMonitorTest.java b/integrity-monitor/src/test/java/org/openecomp/policy/common/im/test/IntegrityMonitorTest.java
index d2fbac46..8e8720da 100644
--- a/integrity-monitor/src/test/java/org/openecomp/policy/common/im/test/IntegrityMonitorTest.java
+++ b/integrity-monitor/src/test/java/org/openecomp/policy/common/im/test/IntegrityMonitorTest.java
@@ -49,7 +49,6 @@ import org.openecomp.policy.common.im.IntegrityMonitor;
import org.openecomp.policy.common.im.IntegrityMonitorProperties;
import org.openecomp.policy.common.im.StateManagement;
import org.openecomp.policy.common.im.jpa.ForwardProgressEntity;
-import org.openecomp.policy.common.im.jpa.ImTestEntity;
import org.openecomp.policy.common.im.jpa.ResourceRegistrationEntity;
import org.openecomp.policy.common.im.jpa.StateManagementEntity;
import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
@@ -603,9 +602,8 @@ public class IntegrityMonitorTest {
StateManagement stateManager = new StateManagement(emf, "group2_dep1");
stateManager.lock();
- //Now add new group1 stateManager instances
- StateManagement sm2 = new StateManagement(emf, "group1_dep1");
- StateManagement sm3 = new StateManagement(emf, "group1_dep2");
+ new StateManagement(emf, "group1_dep1");
+ new StateManagement(emf, "group1_dep2");
boolean sanityPass = true;
Thread.sleep(15000);
@@ -658,7 +656,7 @@ public class IntegrityMonitorTest {
IntegrityMonitor.deleteInstance();
- IntegrityMonitor im = IntegrityMonitor.getInstance(resourceName, myProp);
+ IntegrityMonitor.getInstance(resourceName, myProp);
//the state here is unlocked, enabled, null, null
StateManagementEntity sme = null;
@@ -790,8 +788,7 @@ public class IntegrityMonitorTest {
em.flush();
et.commit();
- //Now add new group1 stateManager instances
- StateManagement sm2 = new StateManagement(emf, "group1_dep1");
+ new StateManagement(emf, "group1_dep1");
boolean sanityPass = true;
//Thread.sleep(15000);
@@ -990,7 +987,7 @@ public class IntegrityMonitorTest {
logger.debug("\nIntegrityMonitorTest:testStateAudit getting list of StateManagementEntity entries\n\n");
Query query = em.createQuery("SELECT s FROM StateManagementEntity s");
- List smeList = query.getResultList();
+ List<?> smeList = query.getResultList();
logger.debug("\n\n");
logger.debug("IntegrityMonitorTest:testStateAudit:StateManagementEntity entries");
diff --git a/integrity-monitor/src/test/java/org/openecomp/policy/common/im/test/StateManagementEntityTest.java b/integrity-monitor/src/test/java/org/openecomp/policy/common/im/test/StateManagementEntityTest.java
index b4222568..6116ef07 100644
--- a/integrity-monitor/src/test/java/org/openecomp/policy/common/im/test/StateManagementEntityTest.java
+++ b/integrity-monitor/src/test/java/org/openecomp/policy/common/im/test/StateManagementEntityTest.java
@@ -20,9 +20,6 @@
package org.openecomp.policy.common.im.test;
-import static org.junit.Assert.*;
-
-import java.util.Date;
import java.util.List;
import java.util.Properties;
@@ -160,7 +157,6 @@ public class StateManagementEntityTest {
//Just test that we are retrieving the right object
@SuppressWarnings("rawtypes")
List resourceList = query.getResultList();
- String resource = null;
if (!resourceList.isEmpty()) {
// exist
StateManagementEntity sme2 = (StateManagementEntity) resourceList.get(0);
diff --git a/integrity-monitor/src/test/java/org/openecomp/policy/common/im/test/StateManagementTest.java b/integrity-monitor/src/test/java/org/openecomp/policy/common/im/test/StateManagementTest.java
index f51f5ac7..92fc225c 100644
--- a/integrity-monitor/src/test/java/org/openecomp/policy/common/im/test/StateManagementTest.java
+++ b/integrity-monitor/src/test/java/org/openecomp/policy/common/im/test/StateManagementTest.java
@@ -20,38 +20,16 @@
package org.openecomp.policy.common.im.test;
-import static org.junit.Assert.*;
-
-import java.util.ArrayList;
-import java.util.List;
import java.util.Properties;
-import java.util.StringTokenizer;
-import java.io.BufferedReader;
-import java.io.FileReader;
-import java.io.IOException;
-
-import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
-import javax.persistence.EntityManager;
-import javax.persistence.EntityManagerFactory;
-import javax.persistence.LockModeType;
-import javax.persistence.PersistenceException;
-import javax.persistence.Query;
-
-
-
-
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.openecomp.policy.common.im.StateManagement;
-import org.openecomp.policy.common.im.StateTransition;
import org.openecomp.policy.common.im.StandbyStatusException;
import org.openecomp.policy.common.im.StateChangeNotifier;
import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
diff --git a/integrity-monitor/src/test/java/org/openecomp/policy/common/im/test/StateTransitionTest.java b/integrity-monitor/src/test/java/org/openecomp/policy/common/im/test/StateTransitionTest.java
index d76cad0d..d90e27bc 100644
--- a/integrity-monitor/src/test/java/org/openecomp/policy/common/im/test/StateTransitionTest.java
+++ b/integrity-monitor/src/test/java/org/openecomp/policy/common/im/test/StateTransitionTest.java
@@ -20,21 +20,8 @@
package org.openecomp.policy.common.im.test;
-import static org.junit.Assert.*;
-
-import java.util.ArrayList;
-import java.util.List;
import java.util.Properties;
-import java.util.StringTokenizer;
-import java.io.BufferedReader;
-import java.io.FileReader;
-import java.io.IOException;
-
-import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
-import javax.persistence.EntityTransaction;
-import javax.persistence.Persistence;
-
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
@@ -46,8 +33,6 @@ import org.junit.Test;
import org.openecomp.policy.common.im.StateTransition;
import org.openecomp.policy.common.im.StateElement;
-import org.openecomp.policy.common.im.StandbyStatusException;
-import org.openecomp.policy.common.im.StateChangeNotifier;
import org.openecomp.policy.common.logging.flexlogger.FlexLogger;
import org.openecomp.policy.common.logging.flexlogger.Logger;
/*
@@ -90,8 +75,6 @@ public class StateTransitionTest {
@Test
public void testJPA() throws Exception {
logger.info("\n\nlogger.infor StateTransitionTest: Entering\n\n");
- boolean standbyExceptionThrown = false;
-
//These parameters are in a properties file
EntityManagerFactory emf = null;
try {