diff options
Diffstat (limited to 'models-pdp/src/test/java/org')
-rw-r--r-- | models-pdp/src/test/java/org/onap/policy/models/pdp/persistence/provider/PdpProviderTest.java | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/models-pdp/src/test/java/org/onap/policy/models/pdp/persistence/provider/PdpProviderTest.java b/models-pdp/src/test/java/org/onap/policy/models/pdp/persistence/provider/PdpProviderTest.java index 3b3716846..ee9c76b98 100644 --- a/models-pdp/src/test/java/org/onap/policy/models/pdp/persistence/provider/PdpProviderTest.java +++ b/models-pdp/src/test/java/org/onap/policy/models/pdp/persistence/provider/PdpProviderTest.java @@ -30,6 +30,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Properties; +import org.eclipse.persistence.config.PersistenceUnitProperties; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -76,16 +77,12 @@ public class PdpProviderTest { daoParameters.setPersistenceUnit("ToscaConceptTest"); Properties jdbcProperties = new Properties(); - jdbcProperties.setProperty("javax.persistence.jdbc.user", "policy"); - jdbcProperties.setProperty("javax.persistence.jdbc.password", "P01icY"); + jdbcProperties.setProperty(PersistenceUnitProperties.JDBC_USER, "policy"); + jdbcProperties.setProperty(PersistenceUnitProperties.JDBC_PASSWORD, "P01icY"); - // H2 - jdbcProperties.setProperty("javax.persistence.jdbc.driver", "org.h2.Driver"); - jdbcProperties.setProperty("javax.persistence.jdbc.url", "jdbc:h2:mem:testdb"); - - // MariaDB - //jdbcProperties.setProperty("javax.persistence.jdbc.driver", "org.mariadb.jdbc.Driver"); - //jdbcProperties.setProperty("javax.persistence.jdbc.url", "jdbc:mariadb://localhost:3306/policy"); + // H2, use "org.mariadb.jdbc.Driver" and "jdbc:mariadb://localhost:3306/policy" for locally installed MariaDB + jdbcProperties.setProperty(PersistenceUnitProperties.JDBC_DRIVER, "org.h2.Driver"); + jdbcProperties.setProperty(PersistenceUnitProperties.JDBC_URL, "jdbc:h2:mem:testdb"); daoParameters.setJdbcProperties(jdbcProperties ); |