diff --git a/oshdb-api-ignite/src/test/java/org/heigit/ohsome/oshdb/api/tests/MapReduceOSHDBIgniteAffinityCallTest.java b/oshdb-api-ignite/src/test/java/org/heigit/ohsome/oshdb/api/tests/MapReduceOSHDBIgniteAffinityCallTest.java index 2b6861859..37dda5b47 100644 --- a/oshdb-api-ignite/src/test/java/org/heigit/ohsome/oshdb/api/tests/MapReduceOSHDBIgniteAffinityCallTest.java +++ b/oshdb-api-ignite/src/test/java/org/heigit/ohsome/oshdb/api/tests/MapReduceOSHDBIgniteAffinityCallTest.java @@ -1,10 +1,10 @@ package org.heigit.ohsome.oshdb.api.tests; +import static org.heigit.ohsome.oshdb.api.db.OSHDBIgnite.ComputeMode.AFFINITY_CALL; import static org.junit.jupiter.api.Assertions.assertEquals; import java.util.Set; import java.util.stream.Collectors; -import org.heigit.ohsome.oshdb.api.db.OSHDBIgnite; import org.heigit.ohsome.oshdb.util.time.OSHDBTimestamps; import org.junit.jupiter.api.Test; @@ -20,7 +20,7 @@ class MapReduceOSHDBIgniteAffinityCallTest extends MapReduceOSHDBIgniteTest { * @throws Exception if something goes wrong */ MapReduceOSHDBIgniteAffinityCallTest() throws Exception { - super(oshdb -> oshdb.computeMode(OSHDBIgnite.ComputeMode.AFFINITY_CALL)); + super(oshdb -> oshdb.computeMode(AFFINITY_CALL)); } @Test diff --git a/oshdb-api-ignite/src/test/java/org/heigit/ohsome/oshdb/api/tests/MapReduceOSHDBIgniteLocalPeekTest.java b/oshdb-api-ignite/src/test/java/org/heigit/ohsome/oshdb/api/tests/MapReduceOSHDBIgniteLocalPeekTest.java index 2038a7ac0..860e62497 100644 --- a/oshdb-api-ignite/src/test/java/org/heigit/ohsome/oshdb/api/tests/MapReduceOSHDBIgniteLocalPeekTest.java +++ b/oshdb-api-ignite/src/test/java/org/heigit/ohsome/oshdb/api/tests/MapReduceOSHDBIgniteLocalPeekTest.java @@ -1,6 +1,6 @@ package org.heigit.ohsome.oshdb.api.tests; -import org.heigit.ohsome.oshdb.api.db.OSHDBIgnite; +import static org.heigit.ohsome.oshdb.api.db.OSHDBIgnite.ComputeMode.LOCAL_PEEK; /** * {@inheritDoc} @@ -14,6 +14,6 @@ class MapReduceOSHDBIgniteLocalPeekTest extends MapReduceOSHDBIgniteTest { * @throws Exception if something goes wrong */ MapReduceOSHDBIgniteLocalPeekTest() throws Exception { - super(oshdb -> oshdb.computeMode(OSHDBIgnite.ComputeMode.LOCAL_PEEK)); + super(oshdb -> oshdb.computeMode(LOCAL_PEEK)); } } diff --git a/oshdb-api-ignite/src/test/java/org/heigit/ohsome/oshdb/api/tests/MapReduceOSHDBIgniteMissingCacheTest.java b/oshdb-api-ignite/src/test/java/org/heigit/ohsome/oshdb/api/tests/MapReduceOSHDBIgniteMissingCacheTest.java index b3c0c86ad..ba5327e5f 100644 --- a/oshdb-api-ignite/src/test/java/org/heigit/ohsome/oshdb/api/tests/MapReduceOSHDBIgniteMissingCacheTest.java +++ b/oshdb-api-ignite/src/test/java/org/heigit/ohsome/oshdb/api/tests/MapReduceOSHDBIgniteMissingCacheTest.java @@ -21,31 +21,31 @@ class MapReduceOSHDBIgniteMissingCacheTest extends MapReduceOSHDBIgniteTest { @Override @Test() - void testOSMContributionView() throws Exception { + void testOSMContributionView() { assertThrows(OSHDBTableNotFoundException.class, super::testOSMContributionView); } @Override @Test() - void testOSMEntitySnapshotView() throws Exception { + void testOSMEntitySnapshotView() { assertThrows(OSHDBTableNotFoundException.class, super::testOSMEntitySnapshotView); } @Override @Test() - void testOSMContributionViewStream() throws Exception { + void testOSMContributionViewStream() { assertThrows(OSHDBTableNotFoundException.class, super::testOSMContributionViewStream); } @Override @Test() - void testOSMEntitySnapshotViewStream() throws Exception { + void testOSMEntitySnapshotViewStream() { assertThrows(OSHDBTableNotFoundException.class, super::testOSMEntitySnapshotViewStream); } @Override @Test() - void testTimeoutMapReduce() throws Exception { + void testTimeoutMapReduce() { assertThrows(OSHDBTableNotFoundException.class, this::timeoutMapReduce); } diff --git a/oshdb-api-ignite/src/test/java/org/heigit/ohsome/oshdb/api/tests/MapReduceOSHDBIgniteScanQueryTest.java b/oshdb-api-ignite/src/test/java/org/heigit/ohsome/oshdb/api/tests/MapReduceOSHDBIgniteScanQueryTest.java index 73682f134..dcae4d3b6 100644 --- a/oshdb-api-ignite/src/test/java/org/heigit/ohsome/oshdb/api/tests/MapReduceOSHDBIgniteScanQueryTest.java +++ b/oshdb-api-ignite/src/test/java/org/heigit/ohsome/oshdb/api/tests/MapReduceOSHDBIgniteScanQueryTest.java @@ -1,8 +1,8 @@ package org.heigit.ohsome.oshdb.api.tests; +import static org.heigit.ohsome.oshdb.api.db.OSHDBIgnite.ComputeMode.SCAN_QUERY; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.heigit.ohsome.oshdb.api.db.OSHDBIgnite; import org.junit.jupiter.api.Test; /** @@ -17,12 +17,12 @@ class MapReduceOSHDBIgniteScanQueryTest extends MapReduceOSHDBIgniteTest { * @throws Exception if something goes wrong */ MapReduceOSHDBIgniteScanQueryTest() throws Exception { - super(oshdb -> oshdb.computeMode(OSHDBIgnite.ComputeMode.SCAN_QUERY)); + super(oshdb -> oshdb.computeMode(SCAN_QUERY)); } @Override @Test - void testTimeoutStream() throws Exception { + void testTimeoutStream() { // ignore this test -> scanquery backend currently doesn't support timeouts for stream() assertTrue(true); } diff --git a/oshdb-api-ignite/src/test/java/org/heigit/ohsome/oshdb/api/tests/MapReduceOSHDBIgniteTest.java b/oshdb-api-ignite/src/test/java/org/heigit/ohsome/oshdb/api/tests/MapReduceOSHDBIgniteTest.java index f727366dd..9c094d9ee 100644 --- a/oshdb-api-ignite/src/test/java/org/heigit/ohsome/oshdb/api/tests/MapReduceOSHDBIgniteTest.java +++ b/oshdb-api-ignite/src/test/java/org/heigit/ohsome/oshdb/api/tests/MapReduceOSHDBIgniteTest.java @@ -72,7 +72,7 @@ private static OSHDBDatabase initOshdb(Consumer computeMode) { streamer.allowOverwrite(true); try (final ResultSet rst = - h2Stmt.executeQuery("select level, id, data from " + TableNames.T_NODES.toString())) { + h2Stmt.executeQuery("select level, id, data from " + TableNames.T_NODES)) { while (rst.next()) { final int level = rst.getInt(1); final long id = rst.getLong(2);