aboutsummaryrefslogtreecommitdiffstats
path: root/models-dao
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2021-03-19 18:18:10 +0000
committerliamfallon <liam.fallon@est.tech>2021-03-19 18:18:15 +0000
commitd6db5582b6705c11abbf8b507aa423aa00bcd7ae (patch)
tree94cb0228c8ddd53909ad9acbee1d7dcf4518c7e2 /models-dao
parent28d3d6e8e95f450a6d2a03c74614bbaef50fb410 (diff)
Fix write failure on PDP statistics
Due to the precision of time stamps being saved to the nearest second, a millisecond precision timestamp was being compared to a second precision timestamp, causing the write to fail. This change fixes that. A unit test is also added to test for this on the provider. In addition, a USE-MARIADB flag is being introduced, which allows unit tests to be run against a locally installed MariaDB instance so that the unit tests can be verified against MariaDB locally rather than H2, the default in Gerrit. Issue-ID: POLICY-3146 Change-Id: I878f160956e89506743dc074679ee81ac1c48216 Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'models-dao')
-rw-r--r--models-dao/src/test/resources/META-INF/persistence.xml3
1 files changed, 2 insertions, 1 deletions
diff --git a/models-dao/src/test/resources/META-INF/persistence.xml b/models-dao/src/test/resources/META-INF/persistence.xml
index 04b2c5b44..3d1f4ff27 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-2020 Nordix Foundation.
+ Copyright (C) 2019-2021 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,6 +31,7 @@
<class>org.onap.policy.models.dao.DummyTimestampEntity</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" />