diff options
author | FrancescoFioraEst <francesco.fiora@est.tech> | 2021-10-28 10:19:09 +0100 |
---|---|---|
committer | FrancescoFioraEst <francesco.fiora@est.tech> | 2021-11-05 16:56:25 +0000 |
commit | baf0a9fdfd5e699ce5950914121f093282a3e4ed (patch) | |
tree | 8a86eef69c2c98df0ea868ffe13fc3b442a450ee /runtime-controlloop/src/test/resources | |
parent | 7bc53b8dd7c12dc108ad2625ad6d4c14804e76a6 (diff) |
Add Spring Jpa configuration
Issue-ID: POLICY-3795
Change-Id: Ic0955f412bfcd94094c19aceb4f25be8e695099a
Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
Diffstat (limited to 'runtime-controlloop/src/test/resources')
-rw-r--r-- | runtime-controlloop/src/test/resources/META-INF/persistence.xml | 59 | ||||
-rw-r--r-- | runtime-controlloop/src/test/resources/application_test.properties | 11 |
2 files changed, 11 insertions, 59 deletions
diff --git a/runtime-controlloop/src/test/resources/META-INF/persistence.xml b/runtime-controlloop/src/test/resources/META-INF/persistence.xml index c4e2e8d55..fe460ff4b 100644 --- a/runtime-controlloop/src/test/resources/META-INF/persistence.xml +++ b/runtime-controlloop/src/test/resources/META-INF/persistence.xml @@ -19,64 +19,6 @@ ============LICENSE_END========================================================= --> <persistence xmlns="http://java.sun.com/xml/ns/persistence" version="2.0"> - <persistence-unit name="CommissioningMariaDb" transaction-type="RESOURCE_LOCAL"> - <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider> - - <class>org.onap.policy.models.base.PfConceptKey</class> - <class>org.onap.policy.models.dao.converters.CDataConditioner</class> - <class>org.onap.policy.models.dao.converters.Uuid2String</class> - <class>org.onap.policy.models.pdp.persistence.concepts.JpaPdp</class> - <class>org.onap.policy.models.pdp.persistence.concepts.JpaPdpGroup</class> - <class>org.onap.policy.models.pdp.persistence.concepts.JpaPdpStatistics</class> - <class>org.onap.policy.models.pdp.persistence.concepts.JpaPdpSubGroup</class> - <class>org.onap.policy.models.tosca.simple.concepts.JpaToscaCapabilityAssignment</class> - <class>org.onap.policy.models.tosca.simple.concepts.JpaToscaCapabilityAssignments</class> - <class>org.onap.policy.models.tosca.simple.concepts.JpaToscaCapabilityType</class> - <class>org.onap.policy.models.tosca.simple.concepts.JpaToscaCapabilityTypes</class> - <class>org.onap.policy.models.tosca.simple.concepts.JpaToscaDataType</class> - <class>org.onap.policy.models.tosca.simple.concepts.JpaToscaDataTypes</class> - <class>org.onap.policy.models.tosca.simple.concepts.JpaToscaNodeTemplate</class> - <class>org.onap.policy.models.tosca.simple.concepts.JpaToscaNodeTemplates</class> - <class>org.onap.policy.models.tosca.simple.concepts.JpaToscaNodeType</class> - <class>org.onap.policy.models.tosca.simple.concepts.JpaToscaNodeTypes</class> - <class>org.onap.policy.models.tosca.simple.concepts.JpaToscaParameter</class> - <class>org.onap.policy.models.tosca.simple.concepts.JpaToscaPolicies</class> - <class>org.onap.policy.models.tosca.simple.concepts.JpaToscaPolicy</class> - <class>org.onap.policy.models.tosca.simple.concepts.JpaToscaPolicyType</class> - <class>org.onap.policy.models.tosca.simple.concepts.JpaToscaPolicyTypes</class> - <class>org.onap.policy.models.tosca.simple.concepts.JpaToscaProperty</class> - <class>org.onap.policy.models.tosca.simple.concepts.JpaToscaRelationshipType</class> - <class>org.onap.policy.models.tosca.simple.concepts.JpaToscaRelationshipTypes</class> - <class>org.onap.policy.models.tosca.simple.concepts.JpaToscaRequirement</class> - <class>org.onap.policy.models.tosca.simple.concepts.JpaToscaRequirements</class> - <class>org.onap.policy.models.tosca.simple.concepts.JpaToscaServiceTemplate</class> - <class>org.onap.policy.models.tosca.simple.concepts.JpaToscaTopologyTemplate</class> - <class>org.onap.policy.models.tosca.simple.concepts.JpaToscaTrigger</class> - <class>org.onap.policy.clamp.controlloop.models.controlloop.persistence.concepts.JpaControlLoop</class> - <class>org.onap.policy.clamp.controlloop.models.controlloop.persistence.concepts.JpaControlLoopElement</class> - <class>org.onap.policy.clamp.controlloop.models.controlloop.persistence.concepts.JpaParticipant</class> - <class>org.onap.policy.clamp.controlloop.models.controlloop.persistence.concepts.JpaParticipantStatistics</class> - <class>org.onap.policy.clamp.controlloop.models.controlloop.persistence.concepts.JpaClElementStatistics</class> - - <properties> - <property name="eclipselink.ddl-generation" value="create-or-extend-tables" /> - <property name="eclipselink.ddl-generation.output-mode" value="database" /> - <property name="eclipselink.logging.level" value="INFO" /> - - <!-- property name="eclipselink.logging.level" value="ALL" /> - <property name="eclipselink.logging.level.jpa" value="ALL" /> - <property name="eclipselink.logging.level.ddl" value="ALL" /> - <property name="eclipselink.logging.level.connection" value="ALL" /> - <property name="eclipselink.logging.level.sql" value="ALL" /> - <property name="eclipselink.logging.level.transaction" value="ALL" /> - <property name="eclipselink.logging.level.sequencing" value="ALL" /> - <property name="eclipselink.logging.level.server" value="ALL" /> - <property name="eclipselink.logging.level.query" value="ALL" /> - <property name="eclipselink.logging.level.properties" value="ALL" /--> - </properties> - <shared-cache-mode>NONE</shared-cache-mode> - </persistence-unit> - <persistence-unit name="ToscaConceptTest" transaction-type="RESOURCE_LOCAL"> <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider> @@ -109,7 +51,6 @@ <class>org.onap.policy.clamp.controlloop.models.controlloop.persistence.concepts.JpaClElementStatistics</class> <properties> - <property name="eclipselink.target-database" value="MySQL" /> <property name="eclipselink.ddl-generation" value="drop-and-create-tables" /> <property name="eclipselink.ddl-generation.output-mode" value="database" /> <property name="eclipselink.logging.level" value="INFO" /> diff --git a/runtime-controlloop/src/test/resources/application_test.properties b/runtime-controlloop/src/test/resources/application_test.properties index 61557879d..190281415 100644 --- a/runtime-controlloop/src/test/resources/application_test.properties +++ b/runtime-controlloop/src/test/resources/application_test.properties @@ -2,6 +2,16 @@ spring.security.user.name=healthcheck spring.security.user.password=zb!XztG34 security.enable-csrf=false +spring.datasource.url=jdbc:h2:mem:testdb +spring.datasource.driverClassName=org.h2.Driver +spring.datasource.username=policy +spring.datasource.password=P01icY + +spring.datasource.hikari.connectionTimeout=30000 +spring.datasource.hikari.idleTimeout=600000 +spring.datasource.hikari.maxLifetime=1800000 +spring.datasource.hikari.maximumPoolSize=3 + server.port=6969 server.servlet.context-path=/onap/controlloop server.error.path=/error @@ -9,6 +19,7 @@ server.error.path=/error runtime.supervisionScannerIntervalSec=1000 runtime.participantClUpdateIntervalSec=1000 runtime.participantClStateChangeIntervalSec=1000 +runtime.showSql=true runtime.participantParameters.heartBeatMs=20000 runtime.participantParameters.maxStatusWaitMs=100000 runtime.participantParameters.updateParameters.maxRetryCount=3 |