Speed up tests on policy-api 24/99824/3
authorliamfallon <liam.fallon@est.tech>
Thu, 19 Dec 2019 15:51:13 +0000 (09:51 -0600)
committerliamfallon <liam.fallon@est.tech>
Thu, 2 Jan 2020 12:25:14 +0000 (12:25 +0000)
commit177ee181ab92f51171b3a9886f6ae152e1468d4c
tree11216f033ed4fd43cf8022af7e9ffec35266e2a8
parentaff0352cc138a494ec105947d446a54d5fa035cf
Speed up tests on policy-api

Test initialization and shutown of h2 database and REST server only done
once at beginning of all API unit tests. Duplicate tests removed, all
test done to persistent database and other minor improvements.

We need to check coverage after this review, ti may have dropped by a
few percent. We should design new tests to bring the coverage back up
again.

Issue-ID: POLICY-2297
Change-Id: I7ccb9835e01e08c284fdc4602e3a00e946b5e902
Signed-off-by: liamfallon <liam.fallon@est.tech>
main/src/main/java/org/onap/policy/api/main/rest/ApiRestController.java
main/src/main/java/org/onap/policy/api/main/rest/LegacyApiRestController.java
main/src/main/java/org/onap/policy/api/main/startstop/ApiActivator.java
main/src/test/java/org/onap/policy/api/main/parameters/TestApiParameterHandler.java
main/src/test/java/org/onap/policy/api/main/rest/TestApiRestServer.java
main/src/test/java/org/onap/policy/api/main/rest/TestCommonRestController.java
main/src/test/java/org/onap/policy/api/main/startstop/TestApiActivator.java
main/src/test/java/org/onap/policy/api/main/startstop/TestMain.java
main/src/test/resources/logback-test.xml [new file with mode: 0644]
main/src/test/resources/parameters/ApiConfigParameters.json [deleted file]
packages/policy-api-tarball/src/main/resources/etc/logback.xml