From 3cb682fa71a1749fb99a47d7c8ede2b8984e2c07 Mon Sep 17 00:00:00 2001 From: liamfallon Date: Tue, 16 Apr 2019 11:20:08 +0000 Subject: Fix Security and Unit Test DB issues This review removes more links to the Zookeeper version 3.5.4-beta with Zookeeper version 3.4.14. It also replaces the Derby in-memory database with the H2 in memory database for unit tests. Issue-ID: POLICY-1540 Change-Id: Ic44f2e866644114b7c0cf66aac7e528017b8206b Signed-off-by: liamfallon --- .../apex/examples/myfirstpolicy/MfpModelTest.java | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'examples/examples-myfirstpolicy/src/test/java/org') diff --git a/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/MfpModelTest.java b/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/MfpModelTest.java index d6ec2bb8d..1bd67f961 100644 --- a/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/MfpModelTest.java +++ b/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/MfpModelTest.java @@ -22,11 +22,6 @@ package org.onap.policy.apex.examples.myfirstpolicy; import static org.junit.Assert.assertTrue; -import java.io.File; -import java.sql.Connection; -import java.sql.DriverManager; - -import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult; @@ -39,8 +34,6 @@ import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel; * @author John Keeney (john.keeney@ericsson.com) */ public class MfpModelTest { - - private static Connection connection; private static TestApexModel testApexModel1; private static TestApexModel testApexModel2; @@ -51,23 +44,10 @@ public class MfpModelTest { */ @BeforeClass public static void setup() throws Exception { - Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance(); - connection = DriverManager.getConnection("jdbc:derby:memory:apex_test;create=true"); testApexModel1 = new TestApexModel<>(AxPolicyModel.class, new TestMfpModelCreator.TestMfp1ModelCreator()); testApexModel2 = new TestApexModel<>(AxPolicyModel.class, new TestMfpModelCreator.TestMfp2ModelCreator()); } - /** - * Teardown. - * - * @throws Exception if there is an error - */ - @AfterClass - public static void teardown() throws Exception { - connection.close(); - new File("derby.log").delete(); - } - /** * Test model is valid. * -- cgit 1.2.3-korg