diff options
author | adheli.tavares <adheli.tavares@est.tech> | 2024-02-20 14:33:26 +0000 |
---|---|---|
committer | adheli.tavares <adheli.tavares@est.tech> | 2024-02-21 11:00:35 +0000 |
commit | 389c85c8e7213c10c17896f4c63d94e2b5e9d27a (patch) | |
tree | 1a54214282acaa444c9ce36b5cf8dc7310296640 /models-tosca | |
parent | 107b75a2b584222f7d5dcdbec64063c036b4f2b2 (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-tosca')
7 files changed, 44 insertions, 45 deletions
diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderGenericTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderGenericTest.java index 51976d1e9..d433236b0 100644 --- a/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderGenericTest.java +++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderGenericTest.java @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (C) 2020-2021,2023 Nordix Foundation. + * Copyright (C) 2020-2021, 2023-2024 Nordix Foundation. * Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -85,14 +85,14 @@ public class AuthorativeToscaProviderGenericTest { daoParameters.setPersistenceUnit("ToscaConceptTest"); Properties jdbcProperties = new Properties(); - jdbcProperties.setProperty("javax.persistence.jdbc.user", "policy"); - jdbcProperties.setProperty("javax.persistence.jdbc.password", "P01icY"); + jdbcProperties.setProperty("jakarta.persistence.jdbc.user", "policy"); + jdbcProperties.setProperty("jakarta.persistence.jdbc.password", "P01icY"); if (System.getProperty("USE-MARIADB") != null) { - jdbcProperties.setProperty("javax.persistence.jdbc.driver", "org.mariadb.jdbc.Driver"); - jdbcProperties.setProperty("javax.persistence.jdbc.url", "jdbc:mariadb://localhost:3306/policy"); + jdbcProperties.setProperty("jakarta.persistence.jdbc.driver", "org.mariadb.jdbc.Driver"); + jdbcProperties.setProperty("jakarta.persistence.jdbc.url", "jdbc:mariadb://localhost:3306/policy"); } else { - jdbcProperties.setProperty("javax.persistence.jdbc.driver", "org.h2.Driver"); - jdbcProperties.setProperty("javax.persistence.jdbc.url", + jdbcProperties.setProperty("jakarta.persistence.jdbc.driver", "org.h2.Driver"); + jdbcProperties.setProperty("jakarta.persistence.jdbc.url", "jdbc:h2:mem:AuthorativeToscaProviderGenericTest"); } daoParameters.setJdbcProperties(jdbcProperties); diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderNodeTemplateTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderNodeTemplateTest.java index d47e194eb..69c4704d5 100644 --- a/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderNodeTemplateTest.java +++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderNodeTemplateTest.java @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (C) 2022-2023 Nordix Foundation. + * Copyright (C) 2022-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. @@ -95,14 +95,14 @@ public class AuthorativeToscaProviderNodeTemplateTest { daoParameters.setPersistenceUnit("ToscaConceptTest"); Properties jdbcProperties = new Properties(); - jdbcProperties.setProperty("javax.persistence.jdbc.user", "policy"); - jdbcProperties.setProperty("javax.persistence.jdbc.password", "P01icY"); + jdbcProperties.setProperty("jakarta.persistence.jdbc.user", "policy"); + jdbcProperties.setProperty("jakarta.persistence.jdbc.password", "P01icY"); if (System.getProperty("USE-MARIADB") != null) { - jdbcProperties.setProperty("javax.persistence.jdbc.driver", "org.mariadb.jdbc.Driver"); - jdbcProperties.setProperty("javax.persistence.jdbc.url", "jdbc:mariadb://localhost:3306/policy"); + jdbcProperties.setProperty("jakarta.persistence.jdbc.driver", "org.mariadb.jdbc.Driver"); + jdbcProperties.setProperty("jakarta.persistence.jdbc.url", "jdbc:mariadb://localhost:3306/policy"); } else { - jdbcProperties.setProperty("javax.persistence.jdbc.driver", "org.h2.Driver"); - jdbcProperties.setProperty("javax.persistence.jdbc.url", + jdbcProperties.setProperty("jakarta.persistence.jdbc.driver", "org.h2.Driver"); + jdbcProperties.setProperty("jakarta.persistence.jdbc.url", "jdbc:h2:mem:AuthorativeToscaProviderNodeTemplatesTest"); } daoParameters.setJdbcProperties(jdbcProperties); diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderPolicyTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderPolicyTest.java index 954f21eec..6100397fc 100644 --- a/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderPolicyTest.java +++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderPolicyTest.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. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -77,14 +77,14 @@ public class AuthorativeToscaProviderPolicyTest { daoParameters.setPersistenceUnit("ToscaConceptTest"); Properties jdbcProperties = new Properties(); - jdbcProperties.setProperty("javax.persistence.jdbc.user", "policy"); - jdbcProperties.setProperty("javax.persistence.jdbc.password", "P01icY"); + jdbcProperties.setProperty("jakarta.persistence.jdbc.user", "policy"); + jdbcProperties.setProperty("jakarta.persistence.jdbc.password", "P01icY"); if (System.getProperty("USE-MARIADB") != null) { - jdbcProperties.setProperty("javax.persistence.jdbc.driver", "org.mariadb.jdbc.Driver"); - jdbcProperties.setProperty("javax.persistence.jdbc.url", "jdbc:mariadb://localhost:3306/policy"); + jdbcProperties.setProperty("jakarta.persistence.jdbc.driver", "org.mariadb.jdbc.Driver"); + jdbcProperties.setProperty("jakarta.persistence.jdbc.url", "jdbc:mariadb://localhost:3306/policy"); } else { - jdbcProperties.setProperty("javax.persistence.jdbc.driver", "org.h2.Driver"); - jdbcProperties.setProperty("javax.persistence.jdbc.url", + jdbcProperties.setProperty("jakarta.persistence.jdbc.driver", "org.h2.Driver"); + jdbcProperties.setProperty("jakarta.persistence.jdbc.url", "jdbc:h2:mem:AuthorativeToscaProviderPolicyTest"); } daoParameters.setJdbcProperties(jdbcProperties); diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderPolicyTypeTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderPolicyTypeTest.java index 3511bc8fa..42ac1272f 100644 --- a/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderPolicyTypeTest.java +++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderPolicyTypeTest.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. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -88,14 +88,14 @@ public class AuthorativeToscaProviderPolicyTypeTest { daoParameters.setPersistenceUnit("ToscaConceptTest"); Properties jdbcProperties = new Properties(); - jdbcProperties.setProperty("javax.persistence.jdbc.user", "policy"); - jdbcProperties.setProperty("javax.persistence.jdbc.password", "P01icY"); + jdbcProperties.setProperty("jakarta.persistence.jdbc.user", "policy"); + jdbcProperties.setProperty("jakarta.persistence.jdbc.password", "P01icY"); if (System.getProperty("USE-MARIADB") != null) { - jdbcProperties.setProperty("javax.persistence.jdbc.driver", "org.mariadb.jdbc.Driver"); - jdbcProperties.setProperty("javax.persistence.jdbc.url", "jdbc:mariadb://localhost:3306/policy"); + jdbcProperties.setProperty("jakarta.persistence.jdbc.driver", "org.mariadb.jdbc.Driver"); + jdbcProperties.setProperty("jakarta.persistence.jdbc.url", "jdbc:mariadb://localhost:3306/policy"); } else { - jdbcProperties.setProperty("javax.persistence.jdbc.driver", "org.h2.Driver"); - jdbcProperties.setProperty("javax.persistence.jdbc.url", + jdbcProperties.setProperty("jakarta.persistence.jdbc.driver", "org.h2.Driver"); + jdbcProperties.setProperty("jakarta.persistence.jdbc.url", "jdbc:h2:mem:AuthorativeToscaProviderPolicyTypeTest"); } daoParameters.setJdbcProperties(jdbcProperties); diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/provider/SimpleToscaProviderTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/provider/SimpleToscaProviderTest.java index 2382c5a03..98dfdaefb 100644 --- a/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/provider/SimpleToscaProviderTest.java +++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/provider/SimpleToscaProviderTest.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. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -87,15 +87,15 @@ public class SimpleToscaProviderTest { daoParameters.setPersistenceUnit("ToscaConceptTest"); Properties jdbcProperties = new Properties(); - jdbcProperties.setProperty("javax.persistence.jdbc.user", "policy"); - jdbcProperties.setProperty("javax.persistence.jdbc.password", "P01icY"); + jdbcProperties.setProperty("jakarta.persistence.jdbc.user", "policy"); + jdbcProperties.setProperty("jakarta.persistence.jdbc.password", "P01icY"); if (System.getProperty("USE-MARIADB") != null) { - jdbcProperties.setProperty("javax.persistence.jdbc.driver", "org.mariadb.jdbc.Driver"); - jdbcProperties.setProperty("javax.persistence.jdbc.url", "jdbc:mariadb://localhost:3306/policy"); + jdbcProperties.setProperty("jakarta.persistence.jdbc.driver", "org.mariadb.jdbc.Driver"); + jdbcProperties.setProperty("jakarta.persistence.jdbc.url", "jdbc:mariadb://localhost:3306/policy"); } else { - jdbcProperties.setProperty("javax.persistence.jdbc.driver", "org.h2.Driver"); - jdbcProperties.setProperty("javax.persistence.jdbc.url", "jdbc:h2:mem:SimpleToscaProviderTest"); + jdbcProperties.setProperty("jakarta.persistence.jdbc.driver", "org.h2.Driver"); + jdbcProperties.setProperty("jakarta.persistence.jdbc.url", "jdbc:h2:mem:SimpleToscaProviderTest"); } daoParameters.setJdbcProperties(jdbcProperties); diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/provider/SimpleToscaServiceTemplateProviderTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/provider/SimpleToscaServiceTemplateProviderTest.java index f00fa0fc5..1d6be1b3f 100644 --- a/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/provider/SimpleToscaServiceTemplateProviderTest.java +++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/provider/SimpleToscaServiceTemplateProviderTest.java @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (C) 2020-2021,2023 Nordix Foundation. + * Copyright (C) 2020-2021, 2023-2024 Nordix Foundation. * Modifications Copyright (C) 2019, 2021 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -71,15 +71,15 @@ public class SimpleToscaServiceTemplateProviderTest { daoParameters.setPersistenceUnit("ToscaConceptTest"); Properties jdbcProperties = new Properties(); - jdbcProperties.setProperty("javax.persistence.jdbc.user", "policy"); - jdbcProperties.setProperty("javax.persistence.jdbc.password", "P01icY"); + jdbcProperties.setProperty("jakarta.persistence.jdbc.user", "policy"); + jdbcProperties.setProperty("jakarta.persistence.jdbc.password", "P01icY"); if (System.getProperty("USE-MARIADB") != null) { - jdbcProperties.setProperty("javax.persistence.jdbc.driver", "org.mariadb.jdbc.Driver"); - jdbcProperties.setProperty("javax.persistence.jdbc.url", "jdbc:mariadb://localhost:3306/policy"); + jdbcProperties.setProperty("jakarta.persistence.jdbc.driver", "org.mariadb.jdbc.Driver"); + jdbcProperties.setProperty("jakarta.persistence.jdbc.url", "jdbc:mariadb://localhost:3306/policy"); } else { - jdbcProperties.setProperty("javax.persistence.jdbc.driver", "org.h2.Driver"); - jdbcProperties.setProperty("javax.persistence.jdbc.url", + jdbcProperties.setProperty("jakarta.persistence.jdbc.driver", "org.h2.Driver"); + jdbcProperties.setProperty("jakarta.persistence.jdbc.url", "jdbc:h2:mem:SimpleToscaServiceTemplateProviderTest"); } diff --git a/models-tosca/src/test/resources/META-INF/persistence.xml b/models-tosca/src/test/resources/META-INF/persistence.xml index 922fef286..a5030694f 100644 --- a/models-tosca/src/test/resources/META-INF/persistence.xml +++ b/models-tosca/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. @@ -49,8 +49,7 @@ <class>org.onap.policy.models.tosca.simple.concepts.JpaToscaTrigger</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> |