From 4d3f6339a53f6977c12be27d529ab0408a24dee5 Mon Sep 17 00:00:00 2001 From: Eric Fu Date: Thu, 14 Nov 2024 23:19:05 +0800 Subject: [PATCH] chore: split java connector tests (#19382) --- java/connector-node/assembly/assembly.xml | 1 + java/connector-node/assembly/pom.xml | 4 + .../com/risingwave/connector/TestUtils.java | 0 .../risingwave-connector-service/pom.xml | 16 ++-- .../com/risingwave/connector/FileSink.java | 2 + .../connector/sink/FileSinkTest.java | 0 .../sink/SinkStreamObserverTest.java | 0 .../src/test/resources/log4j2.properties | 0 .../pom.xml | 90 ++++--------------- .../deltalake/DeltaLakeLocalSinkTest.java | 0 .../deltalake/DeltaLakeSinkFactoryTest.java | 0 .../src/test/resources/log4j2.properties | 10 +++ .../risingwave-sink-es-7/pom.xml | 24 +++++ .../sink/elasticsearch/EsSinkTest.java | 0 .../src/test/resources/log4j2.properties | 10 +++ .../risingwave-sink-jdbc/pom.xml | 38 ++++++++ .../connector/sink/jdbc/JDBCSinkTest.java | 0 .../src/test/resources/log4j2.properties | 10 +++ .../pom.xml | 22 +++++ .../connector/sink/http/HttpTest.java | 0 .../src/test/resources/log4j2.properties | 10 +++ .../pom.xml | 22 +++++ .../connector/sink/flink/FlinkMockTest.java | 0 .../src/test/resources/log4j2.properties | 10 +++ .../pom.xml | 7 +- .../connector/source/MongoDbSourceTest.java | 0 .../source/MongoDbValidatorTest.java | 0 .../connector/source/MySQLSourceTest.java | 0 .../connector/source/PostgresSourceTest.java | 0 .../connector/source/SourceTestClient.java | 0 .../src/test/resources/log4j2.properties | 0 .../src/test/resources/my.cnf | 0 .../src/test/resources/orders.tbl | 0 .../test/resources/stored_queries.properties | 0 .../tracing/TracingSlf4jAdapter.java | 4 +- java/pom.xml | 4 +- java/proto/pom.xml | 1 + 37 files changed, 202 insertions(+), 83 deletions(-) rename java/connector-node/{risingwave-connector-test/src/test => connector-api/src/main}/java/com/risingwave/connector/TestUtils.java (100%) rename java/connector-node/{risingwave-connector-test => risingwave-connector-service}/src/test/java/com/risingwave/connector/sink/FileSinkTest.java (100%) rename java/connector-node/{risingwave-connector-test => risingwave-connector-service}/src/test/java/com/risingwave/connector/sink/SinkStreamObserverTest.java (100%) rename java/connector-node/{risingwave-connector-test => risingwave-connector-service}/src/test/resources/log4j2.properties (100%) rename java/connector-node/{risingwave-connector-test => risingwave-sink-deltalake-test}/pom.xml (61%) rename java/connector-node/{risingwave-connector-test => risingwave-sink-deltalake-test}/src/test/java/com/risingwave/connector/sink/deltalake/DeltaLakeLocalSinkTest.java (100%) rename java/connector-node/{risingwave-connector-test => risingwave-sink-deltalake-test}/src/test/java/com/risingwave/connector/sink/deltalake/DeltaLakeSinkFactoryTest.java (100%) create mode 100644 java/connector-node/risingwave-sink-deltalake-test/src/test/resources/log4j2.properties rename java/connector-node/{risingwave-connector-test => risingwave-sink-es-7}/src/test/java/com/risingwave/connector/sink/elasticsearch/EsSinkTest.java (100%) create mode 100644 java/connector-node/risingwave-sink-es-7/src/test/resources/log4j2.properties rename java/connector-node/{risingwave-connector-test => risingwave-sink-jdbc}/src/test/java/com/risingwave/connector/sink/jdbc/JDBCSinkTest.java (100%) create mode 100644 java/connector-node/risingwave-sink-jdbc/src/test/resources/log4j2.properties rename java/connector-node/{risingwave-connector-test => risingwave-sink-mock-flink/risingwave-sink-mock-flink-http-sink}/src/test/java/com/risingwave/connector/sink/http/HttpTest.java (100%) create mode 100644 java/connector-node/risingwave-sink-mock-flink/risingwave-sink-mock-flink-http-sink/src/test/resources/log4j2.properties rename java/connector-node/{risingwave-connector-test => risingwave-sink-mock-flink/risingwave-sink-mock-flink-runtime}/src/test/java/com/risingwave/connector/sink/flink/FlinkMockTest.java (100%) create mode 100644 java/connector-node/risingwave-sink-mock-flink/risingwave-sink-mock-flink-runtime/src/test/resources/log4j2.properties rename java/connector-node/{risingwave-source-test => risingwave-source-cdc-test}/pom.xml (91%) rename java/connector-node/{risingwave-source-test => risingwave-source-cdc-test}/src/test/java/com/risingwave/connector/source/MongoDbSourceTest.java (100%) rename java/connector-node/{risingwave-source-test => risingwave-source-cdc-test}/src/test/java/com/risingwave/connector/source/MongoDbValidatorTest.java (100%) rename java/connector-node/{risingwave-source-test => risingwave-source-cdc-test}/src/test/java/com/risingwave/connector/source/MySQLSourceTest.java (100%) rename java/connector-node/{risingwave-source-test => risingwave-source-cdc-test}/src/test/java/com/risingwave/connector/source/PostgresSourceTest.java (100%) rename java/connector-node/{risingwave-source-test => risingwave-source-cdc-test}/src/test/java/com/risingwave/connector/source/SourceTestClient.java (100%) rename java/connector-node/{risingwave-source-test => risingwave-source-cdc-test}/src/test/resources/log4j2.properties (100%) rename java/connector-node/{risingwave-source-test => risingwave-source-cdc-test}/src/test/resources/my.cnf (100%) rename java/connector-node/{risingwave-source-test => risingwave-source-cdc-test}/src/test/resources/orders.tbl (100%) rename java/connector-node/{risingwave-source-test => risingwave-source-cdc-test}/src/test/resources/stored_queries.properties (100%) diff --git a/java/connector-node/assembly/assembly.xml b/java/connector-node/assembly/assembly.xml index 26df6e8a71af..14402c171e0f 100644 --- a/java/connector-node/assembly/assembly.xml +++ b/java/connector-node/assembly/assembly.xml @@ -34,6 +34,7 @@ *:risingwave-connector-service + *:tracing *:risingwave-source-cdc diff --git a/java/connector-node/assembly/pom.xml b/java/connector-node/assembly/pom.xml index 572a2e83b24e..bd24a7535033 100644 --- a/java/connector-node/assembly/pom.xml +++ b/java/connector-node/assembly/pom.xml @@ -54,6 +54,10 @@ com.risingwave s3-common + + com.risingwave + tracing + diff --git a/java/connector-node/risingwave-connector-test/src/test/java/com/risingwave/connector/TestUtils.java b/java/connector-node/connector-api/src/main/java/com/risingwave/connector/TestUtils.java similarity index 100% rename from java/connector-node/risingwave-connector-test/src/test/java/com/risingwave/connector/TestUtils.java rename to java/connector-node/connector-api/src/main/java/com/risingwave/connector/TestUtils.java diff --git a/java/connector-node/risingwave-connector-service/pom.xml b/java/connector-node/risingwave-connector-service/pom.xml index d51d67497ce0..0a5e9f0b9d60 100644 --- a/java/connector-node/risingwave-connector-service/pom.xml +++ b/java/connector-node/risingwave-connector-service/pom.xml @@ -26,10 +26,6 @@ com.risingwave proto - - com.risingwave - tracing - com.risingwave java-binding @@ -42,12 +38,18 @@ com.google.guava guava - - + + org.slf4j + slf4j-api + com.google.code.gson gson + + org.apache.commons + commons-lang3 + org.apache.commons commons-text @@ -64,6 +66,8 @@ io.prometheus simpleclient_httpserver + + junit junit diff --git a/java/connector-node/risingwave-connector-service/src/main/java/com/risingwave/connector/FileSink.java b/java/connector-node/risingwave-connector-service/src/main/java/com/risingwave/connector/FileSink.java index af2a9e11d04b..31ba4b67b7bf 100644 --- a/java/connector-node/risingwave-connector-service/src/main/java/com/risingwave/connector/FileSink.java +++ b/java/connector-node/risingwave-connector-service/src/main/java/com/risingwave/connector/FileSink.java @@ -29,6 +29,8 @@ import java.util.UUID; import java.util.stream.IntStream; +// `FileSink` only serves for testing purpose. It is NOT the file sink in RisingWave docs. +// TODO: consider rename or remove it to avoid confusion public class FileSink extends SinkWriterBase { private final FileWriter sinkWriter; diff --git a/java/connector-node/risingwave-connector-test/src/test/java/com/risingwave/connector/sink/FileSinkTest.java b/java/connector-node/risingwave-connector-service/src/test/java/com/risingwave/connector/sink/FileSinkTest.java similarity index 100% rename from java/connector-node/risingwave-connector-test/src/test/java/com/risingwave/connector/sink/FileSinkTest.java rename to java/connector-node/risingwave-connector-service/src/test/java/com/risingwave/connector/sink/FileSinkTest.java diff --git a/java/connector-node/risingwave-connector-test/src/test/java/com/risingwave/connector/sink/SinkStreamObserverTest.java b/java/connector-node/risingwave-connector-service/src/test/java/com/risingwave/connector/sink/SinkStreamObserverTest.java similarity index 100% rename from java/connector-node/risingwave-connector-test/src/test/java/com/risingwave/connector/sink/SinkStreamObserverTest.java rename to java/connector-node/risingwave-connector-service/src/test/java/com/risingwave/connector/sink/SinkStreamObserverTest.java diff --git a/java/connector-node/risingwave-connector-test/src/test/resources/log4j2.properties b/java/connector-node/risingwave-connector-service/src/test/resources/log4j2.properties similarity index 100% rename from java/connector-node/risingwave-connector-test/src/test/resources/log4j2.properties rename to java/connector-node/risingwave-connector-service/src/test/resources/log4j2.properties diff --git a/java/connector-node/risingwave-connector-test/pom.xml b/java/connector-node/risingwave-sink-deltalake-test/pom.xml similarity index 61% rename from java/connector-node/risingwave-connector-test/pom.xml rename to java/connector-node/risingwave-sink-deltalake-test/pom.xml index d3d47b0bc457..c677dd864c11 100644 --- a/java/connector-node/risingwave-connector-test/pom.xml +++ b/java/connector-node/risingwave-sink-deltalake-test/pom.xml @@ -9,9 +9,15 @@ ../../pom.xml 4.0.0 - risingwave-connector-test + risingwave-sink-deltalake-test jar - risingwave-connector-test + risingwave-sink-deltalake-test + + This module contains the unit test of Delta Lake Sink. Usually we just put the unit test alongside + the main code, but Delta Lake's test relies on Apache Spark, which contains numerous dependencies and + can easily conflict with ours. By splitting it as a dedicated module, these Spark's dependencies + (especially the stale ones) only affect the test itself. + 1.0.0 @@ -28,11 +34,6 @@ risingwave-sink-deltalake test - - com.risingwave - risingwave-sink-iceberg - test - com.risingwave s3-common @@ -53,14 +54,22 @@ io.grpc grpc-protobuf + test org.apache.logging.log4j log4j-api + test org.apache.logging.log4j log4j-core + test + + + org.apache.logging.log4j + log4j-slf4j2-impl + test org.apache.hadoop @@ -101,30 +110,8 @@ 3.24.2 test - - com.zaxxer - HikariCP - 5.0.1 - test - - - org.testcontainers - testcontainers - - - org.testcontainers - mysql - - - org.testcontainers - postgresql - - - org.testcontainers - elasticsearch - ${testcontainers.version} - test - + + com.fasterxml.jackson.core jackson-databind @@ -138,46 +125,5 @@ test - - com.risingwave - risingwave-connector-service - test - - - com.risingwave - tracing - - - - - com.risingwave - risingwave-sink-jdbc - test - - - com.risingwave - risingwave-sink-es-7 - test - - - com.risingwave - risingwave-sink-cassandra - test - - - com.risingwave - risingwave-sink-mock-flink-runtime - test - - - com.risingwave - risingwave-sink-mock-flink-common - test - - - com.risingwave - risingwave-sink-mock-flink-http-sink - test - diff --git a/java/connector-node/risingwave-connector-test/src/test/java/com/risingwave/connector/sink/deltalake/DeltaLakeLocalSinkTest.java b/java/connector-node/risingwave-sink-deltalake-test/src/test/java/com/risingwave/connector/sink/deltalake/DeltaLakeLocalSinkTest.java similarity index 100% rename from java/connector-node/risingwave-connector-test/src/test/java/com/risingwave/connector/sink/deltalake/DeltaLakeLocalSinkTest.java rename to java/connector-node/risingwave-sink-deltalake-test/src/test/java/com/risingwave/connector/sink/deltalake/DeltaLakeLocalSinkTest.java diff --git a/java/connector-node/risingwave-connector-test/src/test/java/com/risingwave/connector/sink/deltalake/DeltaLakeSinkFactoryTest.java b/java/connector-node/risingwave-sink-deltalake-test/src/test/java/com/risingwave/connector/sink/deltalake/DeltaLakeSinkFactoryTest.java similarity index 100% rename from java/connector-node/risingwave-connector-test/src/test/java/com/risingwave/connector/sink/deltalake/DeltaLakeSinkFactoryTest.java rename to java/connector-node/risingwave-sink-deltalake-test/src/test/java/com/risingwave/connector/sink/deltalake/DeltaLakeSinkFactoryTest.java diff --git a/java/connector-node/risingwave-sink-deltalake-test/src/test/resources/log4j2.properties b/java/connector-node/risingwave-sink-deltalake-test/src/test/resources/log4j2.properties new file mode 100644 index 000000000000..a380d72fc3c2 --- /dev/null +++ b/java/connector-node/risingwave-sink-deltalake-test/src/test/resources/log4j2.properties @@ -0,0 +1,10 @@ +rootLogger.level=ERROR +# declare the appender to use +appenders=console +# appender properties +appender.console.type=Console +appender.console.name=stdout +appender.console.layout.type=PatternLayout +appender.console.layout.pattern=%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%t] %c{2}:%L - %m%n +rootLogger.appenderRefs=console +rootLogger.appenderRef.console.ref=stdout diff --git a/java/connector-node/risingwave-sink-es-7/pom.xml b/java/connector-node/risingwave-sink-es-7/pom.xml index 4ff4bd76ef10..e46ce06068f1 100644 --- a/java/connector-node/risingwave-sink-es-7/pom.xml +++ b/java/connector-node/risingwave-sink-es-7/pom.xml @@ -63,6 +63,30 @@ org.apache.httpcomponents httpclient + + + + org.testcontainers + elasticsearch + ${testcontainers.version} + test + + + org.apache.logging.log4j + log4j-api + test + + + org.apache.logging.log4j + log4j-slf4j2-impl + test + + + org.apache.logging.log4j + log4j-core + test + + diff --git a/java/connector-node/risingwave-connector-test/src/test/java/com/risingwave/connector/sink/elasticsearch/EsSinkTest.java b/java/connector-node/risingwave-sink-es-7/src/test/java/com/risingwave/connector/sink/elasticsearch/EsSinkTest.java similarity index 100% rename from java/connector-node/risingwave-connector-test/src/test/java/com/risingwave/connector/sink/elasticsearch/EsSinkTest.java rename to java/connector-node/risingwave-sink-es-7/src/test/java/com/risingwave/connector/sink/elasticsearch/EsSinkTest.java diff --git a/java/connector-node/risingwave-sink-es-7/src/test/resources/log4j2.properties b/java/connector-node/risingwave-sink-es-7/src/test/resources/log4j2.properties new file mode 100644 index 000000000000..a380d72fc3c2 --- /dev/null +++ b/java/connector-node/risingwave-sink-es-7/src/test/resources/log4j2.properties @@ -0,0 +1,10 @@ +rootLogger.level=ERROR +# declare the appender to use +appenders=console +# appender properties +appender.console.type=Console +appender.console.name=stdout +appender.console.layout.type=PatternLayout +appender.console.layout.pattern=%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%t] %c{2}:%L - %m%n +rootLogger.appenderRefs=console +rootLogger.appenderRef.console.ref=stdout diff --git a/java/connector-node/risingwave-sink-jdbc/pom.xml b/java/connector-node/risingwave-sink-jdbc/pom.xml index 52947595c741..5a467f7f2b35 100644 --- a/java/connector-node/risingwave-sink-jdbc/pom.xml +++ b/java/connector-node/risingwave-sink-jdbc/pom.xml @@ -42,5 +42,43 @@ mysql-connector-j + + + + junit + junit + test + + + org.apache.logging.log4j + log4j-api + test + + + org.apache.logging.log4j + log4j-slf4j2-impl + test + + + org.apache.logging.log4j + log4j-core + test + + + org.testcontainers + testcontainers + test + + + org.testcontainers + mysql + test + + + org.testcontainers + postgresql + test + + diff --git a/java/connector-node/risingwave-connector-test/src/test/java/com/risingwave/connector/sink/jdbc/JDBCSinkTest.java b/java/connector-node/risingwave-sink-jdbc/src/test/java/com/risingwave/connector/sink/jdbc/JDBCSinkTest.java similarity index 100% rename from java/connector-node/risingwave-connector-test/src/test/java/com/risingwave/connector/sink/jdbc/JDBCSinkTest.java rename to java/connector-node/risingwave-sink-jdbc/src/test/java/com/risingwave/connector/sink/jdbc/JDBCSinkTest.java diff --git a/java/connector-node/risingwave-sink-jdbc/src/test/resources/log4j2.properties b/java/connector-node/risingwave-sink-jdbc/src/test/resources/log4j2.properties new file mode 100644 index 000000000000..a380d72fc3c2 --- /dev/null +++ b/java/connector-node/risingwave-sink-jdbc/src/test/resources/log4j2.properties @@ -0,0 +1,10 @@ +rootLogger.level=ERROR +# declare the appender to use +appenders=console +# appender properties +appender.console.type=Console +appender.console.name=stdout +appender.console.layout.type=PatternLayout +appender.console.layout.pattern=%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%t] %c{2}:%L - %m%n +rootLogger.appenderRefs=console +rootLogger.appenderRef.console.ref=stdout diff --git a/java/connector-node/risingwave-sink-mock-flink/risingwave-sink-mock-flink-http-sink/pom.xml b/java/connector-node/risingwave-sink-mock-flink/risingwave-sink-mock-flink-http-sink/pom.xml index bc078c80d166..65719be7a5dd 100644 --- a/java/connector-node/risingwave-sink-mock-flink/risingwave-sink-mock-flink-http-sink/pom.xml +++ b/java/connector-node/risingwave-sink-mock-flink/risingwave-sink-mock-flink-http-sink/pom.xml @@ -33,6 +33,28 @@ risingwave-sink-mock-flink-runtime provided + + + + junit + junit + test + + + org.apache.logging.log4j + log4j-api + test + + + org.apache.logging.log4j + log4j-slf4j2-impl + test + + + org.apache.logging.log4j + log4j-core + test + \ No newline at end of file diff --git a/java/connector-node/risingwave-connector-test/src/test/java/com/risingwave/connector/sink/http/HttpTest.java b/java/connector-node/risingwave-sink-mock-flink/risingwave-sink-mock-flink-http-sink/src/test/java/com/risingwave/connector/sink/http/HttpTest.java similarity index 100% rename from java/connector-node/risingwave-connector-test/src/test/java/com/risingwave/connector/sink/http/HttpTest.java rename to java/connector-node/risingwave-sink-mock-flink/risingwave-sink-mock-flink-http-sink/src/test/java/com/risingwave/connector/sink/http/HttpTest.java diff --git a/java/connector-node/risingwave-sink-mock-flink/risingwave-sink-mock-flink-http-sink/src/test/resources/log4j2.properties b/java/connector-node/risingwave-sink-mock-flink/risingwave-sink-mock-flink-http-sink/src/test/resources/log4j2.properties new file mode 100644 index 000000000000..a380d72fc3c2 --- /dev/null +++ b/java/connector-node/risingwave-sink-mock-flink/risingwave-sink-mock-flink-http-sink/src/test/resources/log4j2.properties @@ -0,0 +1,10 @@ +rootLogger.level=ERROR +# declare the appender to use +appenders=console +# appender properties +appender.console.type=Console +appender.console.name=stdout +appender.console.layout.type=PatternLayout +appender.console.layout.pattern=%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%t] %c{2}:%L - %m%n +rootLogger.appenderRefs=console +rootLogger.appenderRef.console.ref=stdout diff --git a/java/connector-node/risingwave-sink-mock-flink/risingwave-sink-mock-flink-runtime/pom.xml b/java/connector-node/risingwave-sink-mock-flink/risingwave-sink-mock-flink-runtime/pom.xml index c36fdb4bdbfe..00f93908a6f2 100644 --- a/java/connector-node/risingwave-sink-mock-flink/risingwave-sink-mock-flink-runtime/pom.xml +++ b/java/connector-node/risingwave-sink-mock-flink/risingwave-sink-mock-flink-runtime/pom.xml @@ -57,6 +57,28 @@ org.apache.flink flink-connector-base + + + + junit + junit + test + + + org.apache.logging.log4j + log4j-api + test + + + org.apache.logging.log4j + log4j-slf4j2-impl + test + + + org.apache.logging.log4j + log4j-core + test + diff --git a/java/connector-node/risingwave-connector-test/src/test/java/com/risingwave/connector/sink/flink/FlinkMockTest.java b/java/connector-node/risingwave-sink-mock-flink/risingwave-sink-mock-flink-runtime/src/test/java/com/risingwave/connector/sink/flink/FlinkMockTest.java similarity index 100% rename from java/connector-node/risingwave-connector-test/src/test/java/com/risingwave/connector/sink/flink/FlinkMockTest.java rename to java/connector-node/risingwave-sink-mock-flink/risingwave-sink-mock-flink-runtime/src/test/java/com/risingwave/connector/sink/flink/FlinkMockTest.java diff --git a/java/connector-node/risingwave-sink-mock-flink/risingwave-sink-mock-flink-runtime/src/test/resources/log4j2.properties b/java/connector-node/risingwave-sink-mock-flink/risingwave-sink-mock-flink-runtime/src/test/resources/log4j2.properties new file mode 100644 index 000000000000..a380d72fc3c2 --- /dev/null +++ b/java/connector-node/risingwave-sink-mock-flink/risingwave-sink-mock-flink-runtime/src/test/resources/log4j2.properties @@ -0,0 +1,10 @@ +rootLogger.level=ERROR +# declare the appender to use +appenders=console +# appender properties +appender.console.type=Console +appender.console.name=stdout +appender.console.layout.type=PatternLayout +appender.console.layout.pattern=%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%t] %c{2}:%L - %m%n +rootLogger.appenderRefs=console +rootLogger.appenderRef.console.ref=stdout diff --git a/java/connector-node/risingwave-source-test/pom.xml b/java/connector-node/risingwave-source-cdc-test/pom.xml similarity index 91% rename from java/connector-node/risingwave-source-test/pom.xml rename to java/connector-node/risingwave-source-cdc-test/pom.xml index 16bc9e7c7542..e9e204a8e9b7 100644 --- a/java/connector-node/risingwave-source-test/pom.xml +++ b/java/connector-node/risingwave-source-cdc-test/pom.xml @@ -11,7 +11,12 @@ 4.0.0 risingwave-source-test jar - risingwave-source-test + risingwave-source-cdc-test + + This module contains the unit test of CDC sources. Usually we just put the unit test alongside + the main code, but these test cases relies on risingwave-connector-service, which will create a cyclic + dependency. Thus, we create a dedicated module here. + diff --git a/java/connector-node/risingwave-source-test/src/test/java/com/risingwave/connector/source/MongoDbSourceTest.java b/java/connector-node/risingwave-source-cdc-test/src/test/java/com/risingwave/connector/source/MongoDbSourceTest.java similarity index 100% rename from java/connector-node/risingwave-source-test/src/test/java/com/risingwave/connector/source/MongoDbSourceTest.java rename to java/connector-node/risingwave-source-cdc-test/src/test/java/com/risingwave/connector/source/MongoDbSourceTest.java diff --git a/java/connector-node/risingwave-source-test/src/test/java/com/risingwave/connector/source/MongoDbValidatorTest.java b/java/connector-node/risingwave-source-cdc-test/src/test/java/com/risingwave/connector/source/MongoDbValidatorTest.java similarity index 100% rename from java/connector-node/risingwave-source-test/src/test/java/com/risingwave/connector/source/MongoDbValidatorTest.java rename to java/connector-node/risingwave-source-cdc-test/src/test/java/com/risingwave/connector/source/MongoDbValidatorTest.java diff --git a/java/connector-node/risingwave-source-test/src/test/java/com/risingwave/connector/source/MySQLSourceTest.java b/java/connector-node/risingwave-source-cdc-test/src/test/java/com/risingwave/connector/source/MySQLSourceTest.java similarity index 100% rename from java/connector-node/risingwave-source-test/src/test/java/com/risingwave/connector/source/MySQLSourceTest.java rename to java/connector-node/risingwave-source-cdc-test/src/test/java/com/risingwave/connector/source/MySQLSourceTest.java diff --git a/java/connector-node/risingwave-source-test/src/test/java/com/risingwave/connector/source/PostgresSourceTest.java b/java/connector-node/risingwave-source-cdc-test/src/test/java/com/risingwave/connector/source/PostgresSourceTest.java similarity index 100% rename from java/connector-node/risingwave-source-test/src/test/java/com/risingwave/connector/source/PostgresSourceTest.java rename to java/connector-node/risingwave-source-cdc-test/src/test/java/com/risingwave/connector/source/PostgresSourceTest.java diff --git a/java/connector-node/risingwave-source-test/src/test/java/com/risingwave/connector/source/SourceTestClient.java b/java/connector-node/risingwave-source-cdc-test/src/test/java/com/risingwave/connector/source/SourceTestClient.java similarity index 100% rename from java/connector-node/risingwave-source-test/src/test/java/com/risingwave/connector/source/SourceTestClient.java rename to java/connector-node/risingwave-source-cdc-test/src/test/java/com/risingwave/connector/source/SourceTestClient.java diff --git a/java/connector-node/risingwave-source-test/src/test/resources/log4j2.properties b/java/connector-node/risingwave-source-cdc-test/src/test/resources/log4j2.properties similarity index 100% rename from java/connector-node/risingwave-source-test/src/test/resources/log4j2.properties rename to java/connector-node/risingwave-source-cdc-test/src/test/resources/log4j2.properties diff --git a/java/connector-node/risingwave-source-test/src/test/resources/my.cnf b/java/connector-node/risingwave-source-cdc-test/src/test/resources/my.cnf similarity index 100% rename from java/connector-node/risingwave-source-test/src/test/resources/my.cnf rename to java/connector-node/risingwave-source-cdc-test/src/test/resources/my.cnf diff --git a/java/connector-node/risingwave-source-test/src/test/resources/orders.tbl b/java/connector-node/risingwave-source-cdc-test/src/test/resources/orders.tbl similarity index 100% rename from java/connector-node/risingwave-source-test/src/test/resources/orders.tbl rename to java/connector-node/risingwave-source-cdc-test/src/test/resources/orders.tbl diff --git a/java/connector-node/risingwave-source-test/src/test/resources/stored_queries.properties b/java/connector-node/risingwave-source-cdc-test/src/test/resources/stored_queries.properties similarity index 100% rename from java/connector-node/risingwave-source-test/src/test/resources/stored_queries.properties rename to java/connector-node/risingwave-source-cdc-test/src/test/resources/stored_queries.properties diff --git a/java/connector-node/tracing/src/main/java/com/risingwave/tracing/TracingSlf4jAdapter.java b/java/connector-node/tracing/src/main/java/com/risingwave/tracing/TracingSlf4jAdapter.java index 5ccef41e9ac1..e0aee7633c51 100644 --- a/java/connector-node/tracing/src/main/java/com/risingwave/tracing/TracingSlf4jAdapter.java +++ b/java/connector-node/tracing/src/main/java/com/risingwave/tracing/TracingSlf4jAdapter.java @@ -63,8 +63,8 @@ private void logIfEnabled(int level, String format, Object... arguments) { private void logIfEnabled(int level, String msg, Throwable t) { if (TracingSlf4jImpl.isEnabled(level)) { - String sStackTrace = ExceptionUtils.getStackTrace(t); - TracingSlf4jImpl.event(name, level, String.format("%s: %s", msg, sStackTrace)); + String stackTrace = ExceptionUtils.getStackTrace(t); + TracingSlf4jImpl.event(name, level, String.format("%s: %s", msg, stackTrace)); } } diff --git a/java/pom.xml b/java/pom.xml index 65d6d829c50a..9157c7bce6a7 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -48,9 +48,9 @@ connector-node/risingwave-sink-cassandra connector-node/risingwave-sink-jdbc connector-node/risingwave-source-cdc - connector-node/risingwave-connector-test + connector-node/risingwave-sink-deltalake-test connector-node/risingwave-connector-service - connector-node/risingwave-source-test + connector-node/risingwave-source-cdc-test connector-node/assembly connector-node/s3-common connector-node/risingwave-sink-mock-flink diff --git a/java/proto/pom.xml b/java/proto/pom.xml index cb33ed9574e5..f1b5dff96d0f 100644 --- a/java/proto/pom.xml +++ b/java/proto/pom.xml @@ -58,6 +58,7 @@ io.grpc:protoc-gen-grpc-java:1.49.0:exe:${os.detected.classifier} + true