diff --git a/BenchmarkSupport/BenchmarkSupport.gradle b/BenchmarkSupport/BenchmarkSupport.gradle index 8c8f9c0cf77..77fc4fd9b50 100644 --- a/BenchmarkSupport/BenchmarkSupport.gradle +++ b/BenchmarkSupport/BenchmarkSupport.gradle @@ -34,8 +34,7 @@ dependencies { implementation project(':Configuration') implementation 'org.openjdk.jmh:jmh-core:1.20' - testImplementation TestTools.projectDependency(project, 'Util') - testImplementation TestTools.projectDependency(project, 'engine-table') + testImplementation project(':engine-test-utils') testRuntimeOnly project(path: ':configs') testRuntimeOnly project(path: ':test-configs') diff --git a/Integrations/build.gradle b/Integrations/build.gradle index 8f324c2178f..3aaa3a08843 100644 --- a/Integrations/build.gradle +++ b/Integrations/build.gradle @@ -22,8 +22,9 @@ dependencies { implementation project(':log-factory') testImplementation project(':engine-test-utils') - testImplementation TestTools.projectDependency(project, 'engine-time') + // Needed for CalendarInit + testRuntimeOnly TestTools.projectDependency(project, 'engine-time') testRuntimeOnly project(':log-to-slf4j') // add configs, and some runtime dependencies to test classpaths testRuntimeOnly project(':configs') diff --git a/ModelFarm/ModelFarm.gradle b/ModelFarm/ModelFarm.gradle index fcb613a1970..ebc780ea05d 100644 --- a/ModelFarm/ModelFarm.gradle +++ b/ModelFarm/ModelFarm.gradle @@ -20,11 +20,11 @@ dependencies { runtimeOnly project(':configs') - testImplementation TestTools.projectDependency(project, 'engine-table') + testImplementation project(':engine-test-utils') testRuntimeOnly project(':Numerics') testRuntimeOnly project(':log-to-slf4j') - testRuntimeOnly project(path: ':configs') - testRuntimeOnly project(path: ':test-configs') + testRuntimeOnly project(':configs') + testRuntimeOnly project(':test-configs') Classpaths.inheritSlf4j(project, 'slf4j-simple', 'testRuntimeOnly') } diff --git a/Plot/Plot.gradle b/Plot/Plot.gradle index 038280a4e5b..3face152c26 100644 --- a/Plot/Plot.gradle +++ b/Plot/Plot.gradle @@ -25,12 +25,11 @@ dependencies { Classpaths.inheritGuava(project) - testImplementation TestTools.projectDependency(project, 'Util') - testImplementation TestTools.projectDependency(project, 'engine-table') + testImplementation project(':engine-test-utils') testImplementation TestTools.projectDependency(project, 'engine-time') - testRuntimeOnly project(path: ':configs') - testRuntimeOnly project(path: ':test-configs') + testRuntimeOnly project(':configs') + testRuntimeOnly project(':test-configs') testRuntimeOnly project(':Numerics') testRuntimeOnly project(':log-to-slf4j') diff --git a/base-test-utils/build.gradle b/base-test-utils/build.gradle index 901995d518e..e389b8a4e61 100644 --- a/base-test-utils/build.gradle +++ b/base-test-utils/build.gradle @@ -12,6 +12,6 @@ dependencies { api 'io.deephaven:hash:0.1.0' - Classpaths.inheritJUnitClassic(project, 'implementation') - Classpaths.inheritJMock(project, 'implementation') + Classpaths.inheritJUnitClassic(project, 'api') + Classpaths.inheritJMock(project, 'api') } diff --git a/engine/api/build.gradle b/engine/api/build.gradle index c64d7c1f866..75eaf57dd6b 100644 --- a/engine/api/build.gradle +++ b/engine/api/build.gradle @@ -24,7 +24,13 @@ dependencies { compileOnly 'com.google.code.findbugs:jsr305:3.0.2' - testImplementation TestTools.projectDependency(project, 'engine-table') + testImplementation project(':engine-test-utils') + testImplementation depCommonsLang3 Classpaths.inheritJUnitClassic(project, 'testImplementation') + + testRuntimeOnly project(':log-to-slf4j') + testRuntimeOnly project(':configs') + testRuntimeOnly project(':test-configs') + Classpaths.inheritSlf4j(project, 'slf4j-simple', 'testRuntimeOnly') } diff --git a/engine/context/build.gradle b/engine/context/build.gradle index da73cfac799..2b6e72ce090 100644 --- a/engine/context/build.gradle +++ b/engine/context/build.gradle @@ -26,7 +26,6 @@ dependencies { Classpaths.inheritCommonsText(project, 'implementation') Classpaths.inheritImmutables(project) - testImplementation TestTools.projectDependency(project, 'Base') testImplementation project(':engine-test-utils') testRuntimeOnly project(':log-to-slf4j'), diff --git a/engine/function/build.gradle b/engine/function/build.gradle index e6a901ab469..b493bec2635 100644 --- a/engine/function/build.gradle +++ b/engine/function/build.gradle @@ -21,7 +21,7 @@ dependencies { implementation project(':Base') implementation depCommonsLang3 - testImplementation TestTools.projectDependency(project, 'Base') + testImplementation project(':base-test-utils') } def generatedFiles = [] diff --git a/engine/table/build.gradle b/engine/table/build.gradle index 510230d3530..96e23dffa1e 100644 --- a/engine/table/build.gradle +++ b/engine/table/build.gradle @@ -53,11 +53,9 @@ dependencies { Classpaths.inheritGuava(project) - testImplementation TestTools.projectDependency(project, 'Util') testImplementation TestTools.projectDependency(project, 'engine-chunk') testImplementation TestTools.projectDependency(project, 'engine-vector') testImplementation TestTools.projectDependency(project, 'Numerics') - testImplementation TestTools.projectDependency(project, 'engine-context') testImplementation TestTools.projectDependency(project, 'engine-time') testImplementation project(':base-test-utils') testImplementation project(':engine-rowset-test-utils') @@ -76,9 +74,9 @@ dependencies { Classpaths.inheritJUnitPlatform(project) Classpaths.inheritAssertJ(project) - testRuntimeOnly project(':log-to-slf4j'), - project(path: ':configs'), - project(path: ':test-configs') + testRuntimeOnly project(':log-to-slf4j') + testRuntimeOnly project(':configs') + testRuntimeOnly project(':test-configs') Classpaths.inheritSlf4j(project, 'slf4j-simple', 'testRuntimeOnly') } diff --git a/engine/table/src/test/java/io/deephaven/engine/table/impl/QueryTableRangeJoinTest.java b/engine/table/src/test/java/io/deephaven/engine/table/impl/QueryTableRangeJoinTest.java index 5d6ef140de5..6b6366d8c4c 100644 --- a/engine/table/src/test/java/io/deephaven/engine/table/impl/QueryTableRangeJoinTest.java +++ b/engine/table/src/test/java/io/deephaven/engine/table/impl/QueryTableRangeJoinTest.java @@ -24,7 +24,7 @@ import org.junit.Rule; import org.junit.Test; import org.junit.experimental.categories.Category; -import org.opentest4j.AssertionFailedError; +import junit.framework.AssertionFailedError; import java.lang.reflect.Array; import java.time.Instant; @@ -504,7 +504,7 @@ private static void joinAndVerify( assertThat(actualRangeSize).isEqualTo(expectedRangeSize); } } catch (AssertionFailedError e) { - throw new AssertionFailedError(String.format("Failure for type %s at row position %s", + throw new AssertionError(String.format("Failure for type %s at row position %s", type, rowPosition), e); } ++rowPosition; diff --git a/engine/table/src/test/java/io/deephaven/engine/table/impl/TestAddOnlyToBlinkTableAdapter.java b/engine/table/src/test/java/io/deephaven/engine/table/impl/TestAddOnlyToBlinkTableAdapter.java index 04f125c5673..84b74dfa47c 100644 --- a/engine/table/src/test/java/io/deephaven/engine/table/impl/TestAddOnlyToBlinkTableAdapter.java +++ b/engine/table/src/test/java/io/deephaven/engine/table/impl/TestAddOnlyToBlinkTableAdapter.java @@ -17,8 +17,8 @@ import static io.deephaven.engine.testutil.TstUtils.*; import static io.deephaven.engine.util.TableTools.intCol; import static io.deephaven.engine.util.TableTools.stringCol; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.assertEquals; public class TestAddOnlyToBlinkTableAdapter { diff --git a/engine/table/src/test/java/io/deephaven/engine/table/impl/lang/TestQueryLanguageParser.java b/engine/table/src/test/java/io/deephaven/engine/table/impl/lang/TestQueryLanguageParser.java index 18fec0ccca1..32523cbf766 100644 --- a/engine/table/src/test/java/io/deephaven/engine/table/impl/lang/TestQueryLanguageParser.java +++ b/engine/table/src/test/java/io/deephaven/engine/table/impl/lang/TestQueryLanguageParser.java @@ -13,12 +13,11 @@ import io.deephaven.engine.table.impl.QueryCompilerRequestProcessor; import io.deephaven.engine.table.impl.lang.QueryLanguageParser.QueryLanguageParseException; import io.deephaven.engine.testutil.ControlledUpdateGraph; +import io.deephaven.engine.util.PropertySaver; import io.deephaven.engine.util.PyCallableWrapper; -import io.deephaven.time.TimeLiteralReplacedExpression; import io.deephaven.util.QueryConstants; import io.deephaven.util.SafeCloseable; import io.deephaven.util.type.TypeUtils; -import io.deephaven.utils.test.PropertySaver; import io.deephaven.vector.Vector; import io.deephaven.vector.*; import org.apache.commons.lang3.exception.ExceptionUtils; diff --git a/engine/table/src/test/java/io/deephaven/engine/table/impl/updateby/TestEmMinMax.java b/engine/table/src/test/java/io/deephaven/engine/table/impl/updateby/TestEmMinMax.java index e6741f0b1f4..a6da9ea2420 100644 --- a/engine/table/src/test/java/io/deephaven/engine/table/impl/updateby/TestEmMinMax.java +++ b/engine/table/src/test/java/io/deephaven/engine/table/impl/updateby/TestEmMinMax.java @@ -51,7 +51,7 @@ import static io.deephaven.util.QueryConstants.*; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.fail; -import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.Assert.assertThrows; @Category(OutOfBandTest.class) public class TestEmMinMax extends BaseUpdateByTest { @@ -511,10 +511,11 @@ public void testTimeThrowBehaviors() { } private void testThrowsInternal(TableDefaults table) { - assertThrows(TableDataException.class, + assertThrows( + "Encountered negative delta time during EMS processing", + TableDataException.class, () -> table.updateBy(UpdateByOperation.EmMin( - OperationControl.builder().build(), "ts", 100)), - "Encountered negative delta time during EMS processing"); + OperationControl.builder().build(), "ts", 100))); } @Test diff --git a/engine/table/src/test/java/io/deephaven/engine/table/impl/updateby/TestEmStd.java b/engine/table/src/test/java/io/deephaven/engine/table/impl/updateby/TestEmStd.java index 795ffe81dae..5f53a3b5146 100644 --- a/engine/table/src/test/java/io/deephaven/engine/table/impl/updateby/TestEmStd.java +++ b/engine/table/src/test/java/io/deephaven/engine/table/impl/updateby/TestEmStd.java @@ -52,7 +52,7 @@ import static io.deephaven.util.QueryConstants.*; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.fail; -import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.Assert.assertThrows; @Category(OutOfBandTest.class) public class TestEmStd extends BaseUpdateByTest { @@ -525,10 +525,11 @@ public void testTimeThrowBehaviors() { } private void testThrowsInternal(TableDefaults table) { - assertThrows(TableDataException.class, + assertThrows( + "Encountered negative delta time during EMS processing", + TableDataException.class, () -> table.updateBy(UpdateByOperation.EmStd( - OperationControl.builder().build(), "ts", 100)), - "Encountered negative delta time during EMS processing"); + OperationControl.builder().build(), "ts", 100))); } @Test diff --git a/engine/table/src/test/java/io/deephaven/engine/table/impl/updateby/TestEma.java b/engine/table/src/test/java/io/deephaven/engine/table/impl/updateby/TestEma.java index aec517a053c..8787980663c 100644 --- a/engine/table/src/test/java/io/deephaven/engine/table/impl/updateby/TestEma.java +++ b/engine/table/src/test/java/io/deephaven/engine/table/impl/updateby/TestEma.java @@ -49,7 +49,7 @@ import static io.deephaven.engine.util.TableTools.*; import static io.deephaven.time.DateTimeUtils.*; import static io.deephaven.util.QueryConstants.*; -import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.Assert.assertThrows; @Category(OutOfBandTest.class) public class TestEma extends BaseUpdateByTest { @@ -272,10 +272,11 @@ public void testTimeThrowBehaviors() { } private void testThrowsInternal(TableDefaults table) { - assertThrows(TableDataException.class, + assertThrows( + "Encountered negative delta time during EMA processing", + TableDataException.class, () -> table.updateBy(UpdateByOperation.Ema( - OperationControl.builder().build(), "ts", 100)), - "Encountered negative delta time during EMA processing"); + OperationControl.builder().build(), "ts", 100))); } @Test diff --git a/engine/table/src/test/java/io/deephaven/engine/table/impl/updateby/TestEms.java b/engine/table/src/test/java/io/deephaven/engine/table/impl/updateby/TestEms.java index 5ec68ee4c8a..6167bd68ef8 100644 --- a/engine/table/src/test/java/io/deephaven/engine/table/impl/updateby/TestEms.java +++ b/engine/table/src/test/java/io/deephaven/engine/table/impl/updateby/TestEms.java @@ -51,7 +51,7 @@ import static io.deephaven.util.QueryConstants.*; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.fail; -import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.Assert.assertThrows; @Category(OutOfBandTest.class) public class TestEms extends BaseUpdateByTest { @@ -386,10 +386,11 @@ public void testTimeThrowBehaviors() { } private void testThrowsInternal(TableDefaults table) { - assertThrows(TableDataException.class, + assertThrows( + "Encountered negative delta time during EMS processing", + TableDataException.class, () -> table.updateBy(UpdateByOperation.Ems( - OperationControl.builder().build(), "ts", 100)), - "Encountered negative delta time during EMS processing"); + OperationControl.builder().build(), "ts", 100))); } @Test diff --git a/engine/table/src/test/java/io/deephaven/engine/table/impl/updateby/TestForwardFill.java b/engine/table/src/test/java/io/deephaven/engine/table/impl/updateby/TestForwardFill.java index 1bd2ba533db..ebe40be7469 100644 --- a/engine/table/src/test/java/io/deephaven/engine/table/impl/updateby/TestForwardFill.java +++ b/engine/table/src/test/java/io/deephaven/engine/table/impl/updateby/TestForwardFill.java @@ -35,8 +35,8 @@ import static io.deephaven.engine.util.TableTools.stringCol; import static io.deephaven.engine.testutil.junit4.EngineCleanup.printTableUpdates; import static io.deephaven.util.QueryConstants.NULL_INT; -import static org.junit.jupiter.api.Assertions.assertArrayEquals; -import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.Assert.assertArrayEquals; +import static org.junit.Assert.assertEquals; @Category(OutOfBandTest.class) public class TestForwardFill extends BaseUpdateByTest { diff --git a/Util/src/test/java/io/deephaven/utils/test/PropertySaver.java b/engine/table/src/test/java/io/deephaven/engine/util/PropertySaver.java similarity index 97% rename from Util/src/test/java/io/deephaven/utils/test/PropertySaver.java rename to engine/table/src/test/java/io/deephaven/engine/util/PropertySaver.java index 88279e30382..6bc589454a9 100644 --- a/Util/src/test/java/io/deephaven/utils/test/PropertySaver.java +++ b/engine/table/src/test/java/io/deephaven/engine/util/PropertySaver.java @@ -1,7 +1,7 @@ // // Copyright (c) 2016-2024 Deephaven Data Labs and Patent Pending // -package io.deephaven.utils.test; +package io.deephaven.engine.util; import io.deephaven.configuration.Configuration; diff --git a/Util/src/test/java/io/deephaven/utils/test/PropertySaverTest.java b/engine/table/src/test/java/io/deephaven/engine/util/PropertySaverTest.java similarity index 99% rename from Util/src/test/java/io/deephaven/utils/test/PropertySaverTest.java rename to engine/table/src/test/java/io/deephaven/engine/util/PropertySaverTest.java index 5b426aca48f..f088fc4964d 100644 --- a/Util/src/test/java/io/deephaven/utils/test/PropertySaverTest.java +++ b/engine/table/src/test/java/io/deephaven/engine/util/PropertySaverTest.java @@ -1,7 +1,7 @@ // // Copyright (c) 2016-2024 Deephaven Data Labs and Patent Pending // -package io.deephaven.utils.test; +package io.deephaven.engine.util; import io.deephaven.configuration.Configuration; import io.deephaven.configuration.PropertyException; diff --git a/engine/table/src/test/java/io/deephaven/engine/util/TestWindowCheck.java b/engine/table/src/test/java/io/deephaven/engine/util/TestWindowCheck.java index 5447d132b0b..6911ce315d3 100644 --- a/engine/table/src/test/java/io/deephaven/engine/util/TestWindowCheck.java +++ b/engine/table/src/test/java/io/deephaven/engine/util/TestWindowCheck.java @@ -45,7 +45,7 @@ import static io.deephaven.engine.testutil.TstUtils.*; import static io.deephaven.engine.util.TableTools.col; import static io.deephaven.engine.util.TableTools.intCol; -import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.Assert.assertTrue; @Category(OutOfBandTest.class) public class TestWindowCheck { diff --git a/engine/test-utils/build.gradle b/engine/test-utils/build.gradle index bb3b8f172ca..883e4cd7d00 100644 --- a/engine/test-utils/build.gradle +++ b/engine/test-utils/build.gradle @@ -11,7 +11,7 @@ dependencies { implementation project(':Configuration') implementation project(':engine-tuple') - implementation project(':base-test-utils') + api project(':base-test-utils') implementation project(':engine-rowset-test-utils') implementation project(':extensions-source-support') diff --git a/engine/time/build.gradle b/engine/time/build.gradle index 8f55b159ec1..1ad3995e386 100644 --- a/engine/time/build.gradle +++ b/engine/time/build.gradle @@ -20,7 +20,7 @@ dependencies { implementation depJdom2 Classpaths.inheritDagger(project) - testImplementation TestTools.projectDependency(project, 'Base') + testImplementation project(':base-test-utils') testRuntimeOnly project(':log-to-slf4j'), project(path: ':configs'), diff --git a/extensions/arrow/build.gradle b/extensions/arrow/build.gradle index 9eb35a3cf93..7cf80da2a84 100644 --- a/extensions/arrow/build.gradle +++ b/extensions/arrow/build.gradle @@ -15,8 +15,7 @@ dependencies { Classpaths.inheritArrow(project, 'arrow-vector', 'implementation') Classpaths.inheritArrow(project, 'arrow-compression', 'implementation') - testImplementation TestTools.projectDependency(project, 'engine-table'), - TestTools.projectDependency(project, 'Util') + testImplementation TestTools.projectDependency(project, 'engine-table') Classpaths.inheritSlf4j(project, 'slf4j-api', 'implementation') Classpaths.inheritSlf4j(project, 'slf4j-simple', 'testRuntimeOnly') diff --git a/extensions/barrage/build.gradle b/extensions/barrage/build.gradle index 555d7bdd535..dae5b72f7a3 100644 --- a/extensions/barrage/build.gradle +++ b/extensions/barrage/build.gradle @@ -30,12 +30,12 @@ dependencies { Classpaths.inheritImmutables(project) - testImplementation TestTools.projectDependency(project, 'engine-table'), - TestTools.projectDependency(project, 'Util') + testImplementation project(':engine-test-utils') Classpaths.inheritSlf4j(project, 'slf4j-api', 'implementation') Classpaths.inheritSlf4j(project, 'slf4j-simple', 'testRuntimeOnly') testRuntimeOnly project(':log-to-slf4j') + testRuntimeOnly project(':test-configs') Classpaths.inheritJUnitPlatform(project) Classpaths.inheritAssertJ(project) diff --git a/extensions/csv/build.gradle b/extensions/csv/build.gradle index 5b2c497c452..a1d85bcbf62 100644 --- a/extensions/csv/build.gradle +++ b/extensions/csv/build.gradle @@ -21,8 +21,7 @@ dependencies { testImplementation depCommonsCompress testImplementation depCommonsIo - testImplementation project(':engine-test-utils'), - TestTools.projectDependency(project, 'engine-base') + testImplementation project(':engine-test-utils') Classpaths.inheritJUnitClassic(project, 'testImplementation') diff --git a/extensions/jdbc/build.gradle b/extensions/jdbc/build.gradle index 4d217ffbdca..ce1da76ed4d 100644 --- a/extensions/jdbc/build.gradle +++ b/extensions/jdbc/build.gradle @@ -16,12 +16,11 @@ dependencies { Classpaths.inheritJUnitPlatform(project) Classpaths.inheritAssertJ(project) - testImplementation TestTools.projectDependency(project, 'engine-table'), - TestTools.projectDependency(project, 'Util'), - 'com.h2database:h2:2.1.212' + testImplementation project(':engine-test-utils') + testImplementation 'com.h2database:h2:2.1.212' - testRuntimeOnly project(':log-to-slf4j'), - project(path: ':configs'), - project(path: ':test-configs') + testRuntimeOnly project(':log-to-slf4j') + testRuntimeOnly project(':configs') + testRuntimeOnly project(':test-configs') Classpaths.inheritSlf4j(project, 'slf4j-simple', 'testRuntimeOnly') } diff --git a/extensions/kafka/build.gradle b/extensions/kafka/build.gradle index 8ba1c123ad6..39c39e4f980 100644 --- a/extensions/kafka/build.gradle +++ b/extensions/kafka/build.gradle @@ -36,12 +36,12 @@ dependencies { Classpaths.inheritImmutables(project) - testImplementation TestTools.projectDependency(project, 'engine-table') + testImplementation project(':engine-test-utils') Classpaths.inheritJUnitClassic(project, 'testImplementation') - testRuntimeOnly project(':log-to-slf4j'), - project(path: ':configs'), - project(path: ':test-configs') + testRuntimeOnly project(':log-to-slf4j') + testRuntimeOnly project(':configs') + testRuntimeOnly project(':test-configs') Classpaths.inheritSlf4j(project, 'slf4j-simple', 'testRuntimeOnly') Classpaths.inheritAssertJ(project) diff --git a/extensions/parquet/benchmark/build.gradle b/extensions/parquet/benchmark/build.gradle index 21ff1d0de61..eb76219b9f3 100644 --- a/extensions/parquet/benchmark/build.gradle +++ b/extensions/parquet/benchmark/build.gradle @@ -14,11 +14,11 @@ sourceSets { } dependencies { - testImplementation project(':extensions-parquet-table'), - project(':engine-table'), - project(':BenchmarkSupport'), - TestTools.projectDependency(project, 'engine-rowset'), - TestTools.projectDependency(project, 'engine-table') + testImplementation project(':extensions-parquet-table') + testImplementation project(':engine-table') + testImplementation project(':BenchmarkSupport') + testImplementation TestTools.projectDependency(project, 'engine-rowset') + testImplementation TestTools.projectDependency(project, 'engine-table') testAnnotationProcessor 'org.openjdk.jmh:jmh-generator-annprocess:1.21' testCompileOnly 'org.openjdk.jmh:jmh-generator-annprocess:1.21' diff --git a/extensions/parquet/table/build.gradle b/extensions/parquet/table/build.gradle index f7699b750d5..aede6e888b5 100644 --- a/extensions/parquet/table/build.gradle +++ b/extensions/parquet/table/build.gradle @@ -43,7 +43,7 @@ dependencies { testImplementation project(':base-test-utils') testImplementation project(':engine-test-utils') - testImplementation TestTools.projectDependency(project, 'engine-context') + Classpaths.inheritJUnitClassic(project, 'testImplementation') testRuntimeOnly project(':log-to-slf4j'), diff --git a/java-client/flight-dagger/build.gradle b/java-client/flight-dagger/build.gradle index d143bac5742..dc2f030f9b7 100644 --- a/java-client/flight-dagger/build.gradle +++ b/java-client/flight-dagger/build.gradle @@ -25,7 +25,8 @@ dependencies { Classpaths.inheritAssertJ(project) - testImplementation TestTools.projectDependency(project, 'server') + testImplementation project(':server') + testImplementation project(':server-test-utils') testImplementation project(':log-to-slf4j') } diff --git a/java-client/session-dagger/build.gradle b/java-client/session-dagger/build.gradle index 4e57dbe36bf..ec5209bf0e4 100644 --- a/java-client/session-dagger/build.gradle +++ b/java-client/session-dagger/build.gradle @@ -27,10 +27,14 @@ dependencies { Classpaths.inheritAssertJ(project) - testImplementation TestTools.projectDependency(project, 'server') + testImplementation project(':server') + testImplementation project(':server-test-utils') + testImplementation project(':engine-test-utils') + testImplementation project(':Plot') testImplementation project(':java-client-flight') testImplementation project(':proto:proto-backplane-grpc-flight') testImplementation project(':plugin-echo') + testImplementation project(':plugin-figure') testImplementation project(':log-to-slf4j') Classpaths.inheritAutoService(project, true) } diff --git a/open-api/lang-tools/lang-tools.gradle b/open-api/lang-tools/lang-tools.gradle index 0ea6b84920b..65745757d87 100644 --- a/open-api/lang-tools/lang-tools.gradle +++ b/open-api/lang-tools/lang-tools.gradle @@ -23,9 +23,9 @@ dependencies { Classpaths.inheritGroovy(project, 'groovy', 'testImplementation') Classpaths.inheritGroovy(project, 'groovy-templates', 'testImplementation') - testImplementation TestTools.projectDependency(project, 'engine-table') + testImplementation project(':engine-test-utils') testRuntimeOnly project(':configs') - testRuntimeOnly project(':test-configs') + testRuntimeOnly project(':test-configs') testRuntimeOnly project(':Numerics') // intellij can be dumb and leave out our resources directory (sometimes)... // Do not cargo-cult this unless you have similar issues diff --git a/props/test-configs/gradle.properties b/props/test-configs/gradle.properties index eeac3e65888..22d19af833a 100644 --- a/props/test-configs/gradle.properties +++ b/props/test-configs/gradle.properties @@ -1 +1 @@ -io.deephaven.project.ProjectType=JAVA_LOCAL +io.deephaven.project.ProjectType=JAVA_PUBLIC_TESTING diff --git a/server/build.gradle b/server/build.gradle index 76e093daff2..27f6f18aa0a 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -90,19 +90,7 @@ dependencies { implementation 'dev.dirs:directories:26' - testImplementation 'io.grpc:grpc-testing' - testImplementation('io.grpc:grpc-inprocess') - - testImplementation project(':proto:proto-backplane-grpc') - - testImplementation project(':base-test-utils') - testImplementation project(':engine-context') - testImplementation TestTools.projectDependency(project, 'engine-context') - testImplementation TestTools.projectDependency(project, 'Util') - - testImplementation project(':server-test') - Classpaths.inheritJUnitClassic(project, 'testImplementation') - Classpaths.inheritAssertJ(project) + testImplementation project(':server-test-utils') runtimeOnly project(':Numerics'), project(':extensions-kafka') Classpaths.inheritAssertJ(project) @@ -110,8 +98,6 @@ dependencies { testRuntimeOnly project(':log-to-slf4j') Classpaths.inheritSlf4j(project, 'slf4j-simple', 'testRuntimeOnly') - Classpaths.inheritImmutables(project, true) - runtimeOnly project(':authentication:example-providers:psk') } diff --git a/server/jetty/build.gradle b/server/jetty/build.gradle index b6ffb0286db..44e91f47a43 100644 --- a/server/jetty/build.gradle +++ b/server/jetty/build.gradle @@ -40,7 +40,7 @@ dependencies { implementation project(':grpc-java:grpc-mtls') - testImplementation project(':server-test') + testImplementation project(':server-test-utils') Classpaths.inheritJUnitClassic(project, 'testImplementation') Classpaths.inheritAssertJ(project) diff --git a/server/netty/build.gradle b/server/netty/build.gradle index 5d0fe6e592e..3eacfa0724a 100644 --- a/server/netty/build.gradle +++ b/server/netty/build.gradle @@ -23,7 +23,7 @@ dependencies { implementation project(':grpc-java:grpc-mtls') - testImplementation project(':server-test') + testImplementation project(':server-test-utils') Classpaths.inheritJUnitClassic(project, 'testImplementation') Classpaths.inheritAssertJ(project) diff --git a/server/src/test/java/io/deephaven/server/util/TestUtil.java b/server/src/test/java/io/deephaven/server/util/TestUtil.java deleted file mode 100644 index 887cc9f0736..00000000000 --- a/server/src/test/java/io/deephaven/server/util/TestUtil.java +++ /dev/null @@ -1,20 +0,0 @@ -// -// Copyright (c) 2016-2024 Deephaven Data Labs and Patent Pending -// -package io.deephaven.server.util; - -import io.deephaven.base.verify.Assert; -import io.deephaven.util.function.ThrowingRunnable; - -public class TestUtil { - public static void assertThrows( - final Class type, final ThrowingRunnable runner) { - boolean threwExpectedException = false; - try { - runner.run(); - } catch (final Exception exception) { - threwExpectedException = type.isAssignableFrom(exception.getClass()); - } - Assert.eqTrue(threwExpectedException, "threwExpectedException"); - } -} diff --git a/server/test/build.gradle b/server/test-utils/build.gradle similarity index 77% rename from server/test/build.gradle rename to server/test-utils/build.gradle index a9dbbc6a216..6ff2af4b516 100644 --- a/server/test/build.gradle +++ b/server/test-utils/build.gradle @@ -14,13 +14,16 @@ dependencies { implementation project(':extensions-barrage') implementation project(':test-configs') implementation depCommonsLang3 - implementation project(':engine-test-utils') + api project(':engine-test-utils') + + Classpaths.inheritGrpcPlatform(project, 'api') + api 'io.grpc:grpc-testing' + + Classpaths.inheritImmutables(project) Classpaths.inheritArrow(project, 'flight-core', 'implementation') Classpaths.inheritDagger(project) -// Classpaths.inheritJUnitPlatform(project, 'api') - Classpaths.inheritJUnitClassic(project, 'implementation') - + Classpaths.inheritJUnitClassic(project, 'api') } diff --git a/server/test-utils/gradle.properties b/server/test-utils/gradle.properties new file mode 100644 index 00000000000..22d19af833a --- /dev/null +++ b/server/test-utils/gradle.properties @@ -0,0 +1 @@ +io.deephaven.project.ProjectType=JAVA_PUBLIC_TESTING diff --git a/server/src/test/java/io/deephaven/server/runner/DeephavenApiServerSingleAuthenticatedBase.java b/server/test-utils/src/main/java/io/deephaven/server/runner/DeephavenApiServerSingleAuthenticatedBase.java similarity index 100% rename from server/src/test/java/io/deephaven/server/runner/DeephavenApiServerSingleAuthenticatedBase.java rename to server/test-utils/src/main/java/io/deephaven/server/runner/DeephavenApiServerSingleAuthenticatedBase.java diff --git a/server/src/test/java/io/deephaven/server/runner/DeephavenApiServerSingleUnauthenticatedBase.java b/server/test-utils/src/main/java/io/deephaven/server/runner/DeephavenApiServerSingleUnauthenticatedBase.java similarity index 100% rename from server/src/test/java/io/deephaven/server/runner/DeephavenApiServerSingleUnauthenticatedBase.java rename to server/test-utils/src/main/java/io/deephaven/server/runner/DeephavenApiServerSingleUnauthenticatedBase.java diff --git a/server/src/test/java/io/deephaven/server/runner/DeephavenApiServerTestBase.java b/server/test-utils/src/main/java/io/deephaven/server/runner/DeephavenApiServerTestBase.java similarity index 100% rename from server/src/test/java/io/deephaven/server/runner/DeephavenApiServerTestBase.java rename to server/test-utils/src/main/java/io/deephaven/server/runner/DeephavenApiServerTestBase.java diff --git a/server/src/test/java/io/deephaven/server/runner/DeephavenApiServerTestConfig.java b/server/test-utils/src/main/java/io/deephaven/server/runner/DeephavenApiServerTestConfig.java similarity index 100% rename from server/src/test/java/io/deephaven/server/runner/DeephavenApiServerTestConfig.java rename to server/test-utils/src/main/java/io/deephaven/server/runner/DeephavenApiServerTestConfig.java diff --git a/server/test/src/main/java/io/deephaven/server/runner/ExecutionContextUnitTestModule.java b/server/test-utils/src/main/java/io/deephaven/server/runner/ExecutionContextUnitTestModule.java similarity index 100% rename from server/test/src/main/java/io/deephaven/server/runner/ExecutionContextUnitTestModule.java rename to server/test-utils/src/main/java/io/deephaven/server/runner/ExecutionContextUnitTestModule.java diff --git a/server/src/test/java/io/deephaven/server/runner/ServerBuilderInProcessModule.java b/server/test-utils/src/main/java/io/deephaven/server/runner/ServerBuilderInProcessModule.java similarity index 100% rename from server/src/test/java/io/deephaven/server/runner/ServerBuilderInProcessModule.java rename to server/test-utils/src/main/java/io/deephaven/server/runner/ServerBuilderInProcessModule.java diff --git a/server/src/test/java/io/deephaven/server/runner/scheduler/SchedulerDelegatingImplModule.java b/server/test-utils/src/main/java/io/deephaven/server/runner/scheduler/SchedulerDelegatingImplModule.java similarity index 100% rename from server/src/test/java/io/deephaven/server/runner/scheduler/SchedulerDelegatingImplModule.java rename to server/test-utils/src/main/java/io/deephaven/server/runner/scheduler/SchedulerDelegatingImplModule.java diff --git a/server/test/src/main/java/io/deephaven/server/test/FlightMessageRoundTripTest.java b/server/test-utils/src/main/java/io/deephaven/server/test/FlightMessageRoundTripTest.java similarity index 100% rename from server/test/src/main/java/io/deephaven/server/test/FlightMessageRoundTripTest.java rename to server/test-utils/src/main/java/io/deephaven/server/test/FlightMessageRoundTripTest.java diff --git a/server/test/src/main/java/io/deephaven/server/test/TestAuthModule.java b/server/test-utils/src/main/java/io/deephaven/server/test/TestAuthModule.java similarity index 100% rename from server/test/src/main/java/io/deephaven/server/test/TestAuthModule.java rename to server/test-utils/src/main/java/io/deephaven/server/test/TestAuthModule.java diff --git a/server/test/src/main/java/io/deephaven/server/test/TestAuthorizationProvider.java b/server/test-utils/src/main/java/io/deephaven/server/test/TestAuthorizationProvider.java similarity index 100% rename from server/test/src/main/java/io/deephaven/server/test/TestAuthorizationProvider.java rename to server/test-utils/src/main/java/io/deephaven/server/test/TestAuthorizationProvider.java diff --git a/server/src/test/java/io/deephaven/server/util/TestControlledScheduler.java b/server/test-utils/src/main/java/io/deephaven/server/util/TestControlledScheduler.java similarity index 100% rename from server/src/test/java/io/deephaven/server/util/TestControlledScheduler.java rename to server/test-utils/src/main/java/io/deephaven/server/util/TestControlledScheduler.java diff --git a/server/test/gradle.properties b/server/test/gradle.properties deleted file mode 100644 index eeac3e65888..00000000000 --- a/server/test/gradle.properties +++ /dev/null @@ -1 +0,0 @@ -io.deephaven.project.ProjectType=JAVA_LOCAL diff --git a/settings.gradle b/settings.gradle index c33bda9ba61..852e08360bd 100644 --- a/settings.gradle +++ b/settings.gradle @@ -107,8 +107,8 @@ project(':ssl-config').projectDir = file('ssl/config') include(':ssl-kickstart') project(':ssl-kickstart').projectDir = file('ssl/kickstart') -include(':server-test') -project(':server-test').projectDir = file('server/test') +include(':server-test-utils') +project(':server-test-utils').projectDir = file('server/test-utils') include(':server-netty') project(':server-netty').projectDir = file('server/netty')