X-Git-Url: https://gerrit.onap.org/r/gitweb?p=policy%2Fengine.git;a=blobdiff_plain;f=ONAP-PAP-REST%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fpolicy%2Fpap%2Fxacml%2Frest%2Fcomponents%2FPolicyDBDaoTest.java;h=07c30909ac3b4fbaf56ad0407464b37d9d827d8d;hp=80b546d114345441fdce4d82c7000129becaaa6b;hb=c2ca6ea5cb44103903e1409e8dd6db80167e61e8;hpb=766f999081e73b301062f1b96bffb9c52d7e9852 diff --git a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/components/PolicyDBDaoTest.java b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/components/PolicyDBDaoTest.java index 80b546d11..07c30909a 100644 --- a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/components/PolicyDBDaoTest.java +++ b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/components/PolicyDBDaoTest.java @@ -55,7 +55,7 @@ import org.onap.policy.pap.xacml.rest.DataToNotifyPdp; import org.onap.policy.pap.xacml.rest.components.PolicyDBDao.PolicyDBDaoTestClass; import org.onap.policy.pap.xacml.rest.daoimpl.CommonClassDaoImpl; import org.onap.policy.pap.xacml.rest.policycontroller.PolicyCreation; -import org.onap.policy.rest.XACMLRestProperties; +import org.onap.policy.rest.XacmlRestProperties; import org.onap.policy.rest.adapter.PolicyRestAdapter; import org.onap.policy.rest.dao.PolicyDBException; import org.onap.policy.rest.jpa.DatabaseLockEntity; @@ -160,10 +160,10 @@ public class PolicyDBDaoTest { private static void setUpAuditDb() { Properties properties = new Properties(); - properties.put(XACMLRestProperties.PROP_PAP_DB_DRIVER, "org.h2.Driver"); - properties.put(XACMLRestProperties.PROP_PAP_DB_URL, "jdbc:h2:file:./sql/xacmlTest"); - properties.put(XACMLRestProperties.PROP_PAP_DB_USER, "sa"); - properties.put(XACMLRestProperties.PROP_PAP_DB_PASSWORD, ""); + properties.put(XacmlRestProperties.PROP_PAP_DB_DRIVER, "org.h2.Driver"); + properties.put(XacmlRestProperties.PROP_PAP_DB_URL, "jdbc:h2:file:./sql/xacmlTest"); + properties.put(XacmlRestProperties.PROP_PAP_DB_USER, "sa"); + properties.put(XacmlRestProperties.PROP_PAP_DB_PASSWORD, ""); // create the DB and then close it Persistence.createEntityManagerFactory("testPapPU", properties).close(); @@ -568,7 +568,7 @@ public class PolicyDBDaoTest { try { // Add 1000 ms to the timeout just to be sure it actually times out int sleepTime = - Integer.parseInt(XACMLProperties.getProperty(XACMLRestProperties.PROP_PAP_TRANS_TIMEOUT)) + 1000; + Integer.parseInt(XACMLProperties.getProperty(XacmlRestProperties.PROP_PAP_TRANS_TIMEOUT)) + 1000; if (logger.isDebugEnabled()) { Date date = new java.util.Date(); logger.debug("\n\nPolicyDBDaoTest.threadingStabilityTest() " + "\n sleepTime = " + sleepTime @@ -603,7 +603,7 @@ public class PolicyDBDaoTest { try { // Add 1000 ms to the timeout just to be sure it actually times out int sleepTime = - Integer.parseInt(XACMLProperties.getProperty(XACMLRestProperties.PROP_PAP_TRANS_TIMEOUT)) + 1000; + Integer.parseInt(XACMLProperties.getProperty(XacmlRestProperties.PROP_PAP_TRANS_TIMEOUT)) + 1000; if (logger.isDebugEnabled()) { Date date = new java.util.Date(); logger.debug("\n\nPolicyDBDaoTest.threadingStabilityTest() " + "\n sleepTime = " + sleepTime @@ -636,9 +636,9 @@ public class PolicyDBDaoTest { b.close(); // Now let's test the transaction wait time timeout. Shorten the wait time to 1000 ms - System.setProperty(XACMLRestProperties.PROP_PAP_TRANS_WAIT, "1000"); + System.setProperty(XacmlRestProperties.PROP_PAP_TRANS_WAIT, "1000"); // And let's lengthen the transaction timeout to 5000 ms - System.setProperty(XACMLRestProperties.PROP_PAP_TRANS_TIMEOUT, "5000"); + System.setProperty(XacmlRestProperties.PROP_PAP_TRANS_TIMEOUT, "5000"); // get a transacton PolicyDBDaoTransaction t1 = dbd.getNewTransaction(); if (logger.isDebugEnabled()) {