Updated Branches: refs/heads/develop 0596fa600 -> cfde3aac2
simplify test Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/cfde3aac Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/cfde3aac Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/cfde3aac Branch: refs/heads/develop Commit: cfde3aac2c24674d7a177ccbafadd65bdde5aaa1 Parents: 0596fa6 Author: Sebastian Schaffert <[email protected]> Authored: Tue Dec 10 19:00:55 2013 +0100 Committer: Sebastian Schaffert <[email protected]> Committed: Tue Dec 10 19:00:55 2013 +0100 ---------------------------------------------------------------------- .../apache/marmotta/kiwi/test/H2ConcurrencyTest.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/marmotta/blob/cfde3aac/libraries/kiwi/kiwi-triplestore/src/test/java/org/apache/marmotta/kiwi/test/H2ConcurrencyTest.java ---------------------------------------------------------------------- diff --git a/libraries/kiwi/kiwi-triplestore/src/test/java/org/apache/marmotta/kiwi/test/H2ConcurrencyTest.java b/libraries/kiwi/kiwi-triplestore/src/test/java/org/apache/marmotta/kiwi/test/H2ConcurrencyTest.java index b526a0f..bfc5ac6 100644 --- a/libraries/kiwi/kiwi-triplestore/src/test/java/org/apache/marmotta/kiwi/test/H2ConcurrencyTest.java +++ b/libraries/kiwi/kiwi-triplestore/src/test/java/org/apache/marmotta/kiwi/test/H2ConcurrencyTest.java @@ -17,11 +17,6 @@ package org.apache.marmotta.kiwi.test; -import static org.junit.Assert.assertTrue; - -import java.sql.SQLException; -import java.util.Random; - import org.apache.marmotta.kiwi.config.KiWiConfiguration; import org.apache.marmotta.kiwi.persistence.h2.H2Dialect; import org.apache.marmotta.kiwi.sail.KiWiStore; @@ -34,6 +29,11 @@ import org.openrdf.repository.sail.SailRepository; import org.openrdf.sail.SailException; import org.slf4j.LoggerFactory; +import java.sql.SQLException; +import java.util.Random; + +import static org.junit.Assert.assertTrue; + /** * This test starts many triplestore operations in parallel to check if concurrent operations will break things, * @@ -53,6 +53,7 @@ public class H2ConcurrencyTest extends ConcurrencyTestBase { rnd = new Random(); store = new KiWiStore(h2Config); + store.setDropTablesOnShutdown(true); repository = new SailRepository(store); repository.initialize(); } @@ -60,8 +61,6 @@ public class H2ConcurrencyTest extends ConcurrencyTestBase { @AfterClass public static void dropDatabase() throws RepositoryException, SQLException, SailException { assertTrue(store.checkConsistency()); - store.closeValueFactory(); // release all connections before dropping the database - store.getPersistence().dropDatabase(); repository.shutDown(); } }
