Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.osee.orcs.db.mock')
-rw-r--r--plugins/org.eclipse.osee.orcs.db.mock/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.osee.orcs.db.mock/src/org/eclipse/osee/orcs/db/mock/internal/TestDatabase.java8
2 files changed, 6 insertions, 3 deletions
diff --git a/plugins/org.eclipse.osee.orcs.db.mock/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.orcs.db.mock/META-INF/MANIFEST.MF
index 5d66d028ad..9673882f15 100644
--- a/plugins/org.eclipse.osee.orcs.db.mock/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.orcs.db.mock/META-INF/MANIFEST.MF
@@ -9,6 +9,7 @@ Import-Package: org.eclipse.osee.framework.core.data,
org.eclipse.osee.framework.core.exception,
org.eclipse.osee.framework.database,
org.eclipse.osee.framework.database.core,
+ org.eclipse.osee.framework.h2,
org.eclipse.osee.framework.jdk.core.util,
org.eclipse.osee.framework.jdk.core.util.network,
org.junit;version="4.8.2",
diff --git a/plugins/org.eclipse.osee.orcs.db.mock/src/org/eclipse/osee/orcs/db/mock/internal/TestDatabase.java b/plugins/org.eclipse.osee.orcs.db.mock/src/org/eclipse/osee/orcs/db/mock/internal/TestDatabase.java
index 6fb4dfde26..a1fa6261d5 100644
--- a/plugins/org.eclipse.osee.orcs.db.mock/src/org/eclipse/osee/orcs/db/mock/internal/TestDatabase.java
+++ b/plugins/org.eclipse.osee.orcs.db.mock/src/org/eclipse/osee/orcs/db/mock/internal/TestDatabase.java
@@ -19,6 +19,7 @@ import org.eclipse.osee.framework.core.data.IDatabaseInfo;
import org.eclipse.osee.framework.database.IOseeDatabaseService;
import org.eclipse.osee.framework.database.core.IDatabaseInfoProvider;
import org.eclipse.osee.framework.database.core.OseeConnection;
+import org.eclipse.osee.framework.h2.H2DbServer;
import org.eclipse.osee.framework.jdk.core.util.Lib;
import org.eclipse.osee.framework.jdk.core.util.network.PortUtil;
import org.eclipse.osee.orcs.db.mock.OseeDatabase;
@@ -77,8 +78,7 @@ public class TestDatabase {
IDatabaseInfo databaseInfo = new DbInfo(connectionId, port, dbPath);
TestDbProvider provider = new TestDbProvider(databaseInfo);
- String serverAddress = String.format("0.0.0.0:%s", port);
- System.setProperty("osee.db.embedded.server", serverAddress);
+ System.setProperty("osee.db.embedded.server", "");
System.setProperty("osee.application.server.data", tempFolder.getAbsolutePath());
BundleContext context = getContext(bundle);
registration = context.registerService(IDatabaseInfoProvider.class, provider, null);
@@ -86,6 +86,8 @@ public class TestDatabase {
IOseeDatabaseService dbService = OsgiUtil.getService(IOseeDatabaseService.class);
Assert.assertNotNull(dbService);
+ H2DbServer.startServer("0.0.0.0", port);
+
OseeConnection connection = dbService.getConnection();
try {
Assert.assertNotNull(connection);
@@ -131,7 +133,7 @@ public class TestDatabase {
System.setProperty("osee.application.server.data", "");
System.setProperty("osee.db.embedded.server", "");
-
+ H2DbServer.stopServer();
Runtime.getRuntime().addShutdownHook(new Thread() {
@Override
public void run() {

Back to the top