Permalink
Browse files

Fixed RMI tests

  • Loading branch information...
tzaeschke committed Oct 4, 2017
1 parent 43af8b8 commit c90eb972d8fd9e74fa2bbc96d8d36ff94cf9731e
@@ -33,16 +33,13 @@
import org.junit.BeforeClass;
import org.junit.Test;
import org.zoodb.jdo.ZooJdoProperties;
import org.zoodb.test.testutil.RmiTaskLauncher;
import org.zoodb.test.testutil.RmiTestTask;
import org.zoodb.test.testutil.TestProcess;
import org.zoodb.test.testutil.TestTools;
import org.zoodb.test.testutil.rmi.RmiTaskRunner;
import org.zoodb.test.testutil.rmi.RmiTestTask;
public class Test_020_Session {
private static final String DB_NAME = "TestDb";
private static TestProcess rmi = null;
@BeforeClass
public static void setUp() {
@@ -51,9 +48,6 @@ public static void setUp() {
@AfterClass
public static void tearDown() {
if (rmi != null) {
rmi.stop();
}
TestTools.removeDb(DB_NAME);
}
@@ -150,23 +144,18 @@ public void testIgnoreCacheSettings() {
*/
@Test
public void testDualProcessAccessFail() {
rmi = TestProcess.launchRMI();
ZooJdoProperties props = new ZooJdoProperties(DB_NAME);
PersistenceManagerFactory pmf1 =
JDOHelper.getPersistenceManagerFactory(props);
PersistenceManager pm11 = pmf1.getPersistenceManager();
try {
RmiTaskLauncher.runTest(new TestDualProcessFail());
RmiTaskRunner.executeTask(new TestDualProcessFail());
fail();
} catch (JDOUserException e) {
//good
}
//just in case:
rmi.stop();
rmi = null;
pm11.close();
pmf1.close();
}

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit c90eb97

Please sign in to comment.