summaryrefslogtreecommitdiffstats
path: root/integrity-audit/src/test
diff options
context:
space:
mode:
authorHOCKLA <ah999m@att.com>2019-12-11 10:24:44 -0600
committerHOCKLA <ah999m@att.com>2019-12-16 08:41:07 -0600
commit79e69312b4823aa5cd0441704706875d6b56f3dc (patch)
tree85210f82503907758aeacced92a566e3c4b66d27 /integrity-audit/src/test
parent2986d9e70e3f23effcba1e1be0533bd84a9d1baa (diff)
Added JDK 11 upgrades and point to parent java 11 branch
Issue-ID: POLICY-1583 Change-Id: Ic46ffcb6eb5b0d18f9cb0a6a2ec46374e523f54a Signed-off-by: HOCKLA <ah999m@att.com>
Diffstat (limited to 'integrity-audit/src/test')
-rw-r--r--integrity-audit/src/test/java/org/onap/policy/common/ia/DbAuditTest.java33
-rw-r--r--integrity-audit/src/test/java/org/onap/policy/common/ia/IntegrityAuditTest.java4
2 files changed, 19 insertions, 18 deletions
diff --git a/integrity-audit/src/test/java/org/onap/policy/common/ia/DbAuditTest.java b/integrity-audit/src/test/java/org/onap/policy/common/ia/DbAuditTest.java
index 13d48608..220b0635 100644
--- a/integrity-audit/src/test/java/org/onap/policy/common/ia/DbAuditTest.java
+++ b/integrity-audit/src/test/java/org/onap/policy/common/ia/DbAuditTest.java
@@ -26,9 +26,11 @@ import static org.junit.Assert.assertFalse;
import java.util.List;
import java.util.Properties;
+
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
+
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
@@ -123,12 +125,11 @@ public class DbAuditTest extends IntegrityAuditTestBase {
truncateTable(properties, A_SEQ_PU, "IntegrityAuditEntity");
}
- /*
- * Tests printing an error to the log in the event where there are no entities saved in the
- * database
+ /**
+ * Tests printing an error to the log in the event where there are no entities saved in the database.
*/
@Test
- public void noEntitiesTest() throws Exception {
+ public void testNoEntities() throws Exception {
Properties properties = makeProperties();
logger.info("noEntitiesTest: Entering");
@@ -144,11 +145,11 @@ public class DbAuditTest extends IntegrityAuditTestBase {
logger.info("noEntitiesTest: Exit");
}
- /*
- * Tests the detection of only one entry in the database
+ /**
+ * Tests the detection of only one entry in the database.
*/
@Test
- public void oneEntityTest() throws Exception {
+ public void testOneEntity() throws Exception {
Properties properties = makeProperties();
logger.info("oneEntityTest: Entering");
@@ -168,11 +169,11 @@ public class DbAuditTest extends IntegrityAuditTestBase {
logger.info("oneEntityTest: Exit");
}
- /*
- * Tests reporting mismatches and missing entries using the error log
+ /**
+ * Tests reporting mismatches and missing entries using the error log.
*/
@Test
- public void mismatchTest() throws Exception {
+ public void testMismatch() throws Exception {
logger.info("mismatchTest: Entering");
// use new URLs so we get a completely new DB
@@ -187,8 +188,8 @@ public class DbAuditTest extends IntegrityAuditTestBase {
properties2.put(IntegrityAuditProperties.DB_URL, dbUrl2);
/*
- * We must drop and re-create DB1 so that it's sequence generator is in step with the
- * sequence generator for DB2.
+ * We must drop and re-create DB1 so that it's sequence generator is in step with the sequence generator for
+ * DB2.
*/
recreateDb1(properties);
@@ -221,8 +222,8 @@ public class DbAuditTest extends IntegrityAuditTestBase {
new DbDao("pdp3", A_SEQ_PU, properties2).destroy();
/*
- * Run the DB Audit, once it finds a mismatch and sleeps, update DB1 to have the same entry
- * as DB2 it can be confirmed that the mismatch is resolved
+ * Run the DB Audit, once it finds a mismatch and sleeps, update DB1 to have the same entry as DB2 it can be
+ * confirmed that the mismatch is resolved
*/
DbAudit dbAudit = new DbAudit(dbDao);
dbAudit.dbAudit(RESOURCE_NAME, A_SEQ_PU, NODE_TYPE);
@@ -231,8 +232,8 @@ public class DbAuditTest extends IntegrityAuditTestBase {
new DbDao("pdp3", A_SEQ_PU, properties, dbUrl2).destroy();
/*
- * Run the audit again and correct the mismatch, the result should be one entry in the
- * mismatchKeySet because of the missing entry from the beginning of the test
+ * Run the audit again and correct the mismatch, the result should be one entry in the mismatchKeySet because of
+ * the missing entry from the beginning of the test
*/
dbAudit.dbAudit(RESOURCE_NAME, A_SEQ_PU, NODE_TYPE);
diff --git a/integrity-audit/src/test/java/org/onap/policy/common/ia/IntegrityAuditTest.java b/integrity-audit/src/test/java/org/onap/policy/common/ia/IntegrityAuditTest.java
index 34a9364f..c9ff6854 100644
--- a/integrity-audit/src/test/java/org/onap/policy/common/ia/IntegrityAuditTest.java
+++ b/integrity-audit/src/test/java/org/onap/policy/common/ia/IntegrityAuditTest.java
@@ -32,11 +32,11 @@ public class IntegrityAuditTest {
private static final String RESOURCE_NAME = "resourceName";
private static final String SOMETHING = "something";
- @Test
/**
* Test if we can access the updated bad params outside of the parmsAreBad method.
*/
- public void parmsAreBadTest() {
+ @Test
+ public void testParmsAreBad() {
// Try with 2 null params
StringBuilder badParams = new StringBuilder();
IntegrityAudit.parmsAreBad(null, SOMETHING, null, badParams);