summaryrefslogtreecommitdiffstats
path: root/model/context-model/src/test/java
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2019-04-16 11:20:08 +0000
committerliamfallon <liam.fallon@est.tech>2019-04-16 11:20:08 +0000
commit3cb682fa71a1749fb99a47d7c8ede2b8984e2c07 (patch)
tree08aa6b83f985cfefcb0618d146b2e77428110055 /model/context-model/src/test/java
parent2ba499f11094cfd1321e59789869a0c475406b58 (diff)
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 <liam.fallon@est.tech>
Diffstat (limited to 'model/context-model/src/test/java')
-rw-r--r--model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/ApexContextModelTest.java19
1 files changed, 2 insertions, 17 deletions
diff --git a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/ApexContextModelTest.java b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/ApexContextModelTest.java
index 948c2024c..f41c39fd2 100644
--- a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/ApexContextModelTest.java
+++ b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/ApexContextModelTest.java
@@ -22,11 +22,6 @@ package org.onap.policy.apex.model.contextmodel.handling;
import static org.junit.Assert.assertTrue;
-import java.io.File;
-import java.sql.Connection;
-import java.sql.DriverManager;
-
-import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
@@ -36,33 +31,23 @@ import org.onap.policy.apex.model.contextmodel.concepts.AxContextModel;
/**
* Apex context model tests.
- *
+ *
* @author liam
*
*/
public class ApexContextModelTest {
- private Connection connection;
TestApexModel<AxContextModel> testApexModel;
/**
* Set up tests.
- *
+ *
* @throws Exception a testing exception
*/
@Before
public void setup() throws Exception {
- Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
- connection = DriverManager.getConnection("jdbc:derby:memory:apex_test;create=true");
-
testApexModel = new TestApexModel<AxContextModel>(AxContextModel.class, new TestApexContextModelCreator());
}
- @After
- public void teardown() throws Exception {
- connection.close();
- new File("derby.log").delete();
- }
-
@Test
public void testModelValid() throws Exception {
final AxValidationResult result = testApexModel.testApexModelValid();