aboutsummaryrefslogtreecommitdiffstats
path: root/models-dao/src/test
diff options
context:
space:
mode:
authoradheli.tavares <adheli.tavares@est.tech>2024-02-20 14:33:26 +0000
committeradheli.tavares <adheli.tavares@est.tech>2024-02-21 11:00:35 +0000
commit389c85c8e7213c10c17896f4c63d94e2b5e9d27a (patch)
tree1a54214282acaa444c9ce36b5cf8dc7310296640 /models-dao/src/test
parent107b75a2b584222f7d5dcdbec64063c036b4f2b2 (diff)
Fix config files to remove outdated configuration for hibernate
Issue-ID: POLICY-4929 Change-Id: Icd796030753c505c99c1840d8d11fb2f8300c15e Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'models-dao/src/test')
-rw-r--r--models-dao/src/test/java/org/onap/policy/models/dao/EntityTest.java26
-rw-r--r--models-dao/src/test/resources/META-INF/persistence.xml5
2 files changed, 15 insertions, 16 deletions
diff --git a/models-dao/src/test/java/org/onap/policy/models/dao/EntityTest.java b/models-dao/src/test/java/org/onap/policy/models/dao/EntityTest.java
index e5f40ebf4..4f281bd68 100644
--- a/models-dao/src/test/java/org/onap/policy/models/dao/EntityTest.java
+++ b/models-dao/src/test/java/org/onap/policy/models/dao/EntityTest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019-2021,2023 Nordix Foundation.
+ * Copyright (C) 2019-2021, 2023-2024 Nordix Foundation.
* Modifications Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2022 Bell Canada. All rights reserved.
* ================================================================================
@@ -84,10 +84,10 @@ public class EntityTest {
Properties jdbcProperties = new Properties();
// @formatter:off
- jdbcProperties.setProperty("javax.persistence.jdbc.driver", "org.h2.Driver");
- jdbcProperties.setProperty("javax.persistence.jdbc.url", "jdbc:h2:mem:EntityTest");
- jdbcProperties.setProperty("javax.persistence.jdbc.user", "sa");
- jdbcProperties.setProperty("javax.persistence.jdbc.password", "");
+ jdbcProperties.setProperty("jakarta.persistence.jdbc.driver", "org.h2.Driver");
+ jdbcProperties.setProperty("jakarta.persistence.jdbc.url", "jdbc:h2:mem:EntityTest");
+ jdbcProperties.setProperty("jakarta.persistence.jdbc.user", "sa");
+ jdbcProperties.setProperty("jakarta.persistence.jdbc.password", "");
// @formatter:on
daoParameters.setJdbcProperties(jdbcProperties);
@@ -117,10 +117,10 @@ public class EntityTest {
daoParameters.setPersistenceUnit("DaoTest");
Properties jdbcProperties = new Properties();
- jdbcProperties.setProperty("javax.persistence.jdbc.driver", "org.h2.Driver");
- jdbcProperties.setProperty("javax.persistence.jdbc.url", "jdbc:h2:mem:EntityTest");
- jdbcProperties.setProperty("javax.persistence.jdbc.user", "sa");
- jdbcProperties.setProperty("javax.persistence.jdbc.password", "");
+ jdbcProperties.setProperty("jakarta.persistence.jdbc.driver", "org.h2.Driver");
+ jdbcProperties.setProperty("jakarta.persistence.jdbc.url", "jdbc:h2:mem:EntityTest");
+ jdbcProperties.setProperty("jakarta.persistence.jdbc.user", "sa");
+ jdbcProperties.setProperty("jakarta.persistence.jdbc.password", "");
daoParameters.setJdbcProperties(jdbcProperties);
@@ -145,10 +145,10 @@ public class EntityTest {
daoParameters.setPersistenceUnit("DaoTest");
Properties jdbcProperties = new Properties();
- jdbcProperties.setProperty("javax.persistence.jdbc.driver", "org.h2.Driver");
- jdbcProperties.setProperty("javax.persistence.jdbc.url", "jdbc:h2:mem:EntityTest");
- jdbcProperties.setProperty("javax.persistence.jdbc.user", "sa");
- jdbcProperties.setProperty("javax.persistence.jdbc.password", "");
+ jdbcProperties.setProperty("jakarta.persistence.jdbc.driver", "org.h2.Driver");
+ jdbcProperties.setProperty("jakarta.persistence.jdbc.url", "jdbc:h2:mem:EntityTest");
+ jdbcProperties.setProperty("jakarta.persistence.jdbc.user", "sa");
+ jdbcProperties.setProperty("jakarta.persistence.jdbc.password", "");
daoParameters.setJdbcProperties(jdbcProperties);
diff --git a/models-dao/src/test/resources/META-INF/persistence.xml b/models-dao/src/test/resources/META-INF/persistence.xml
index 5148f059a..3fb50d9e9 100644
--- a/models-dao/src/test/resources/META-INF/persistence.xml
+++ b/models-dao/src/test/resources/META-INF/persistence.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
============LICENSE_START=======================================================
- Copyright (C) 2019-2021,2023 Nordix Foundation.
+ Copyright (C) 2019-2021, 2023-2024 Nordix Foundation.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -31,8 +31,7 @@
<class>org.onap.policy.models.dao.DummyReferenceTimestampEntity</class>
<properties>
- <property name="javax.persistence.schema-generation.database.action" value="drop-and-create" />
- <property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect" />
+ <property name="jakarta.persistence.schema-generation.database.action" value="drop-and-create" />
<property name="hibernate.show_sql" value="false" />
</properties>
</persistence-unit>