From ad0932ed792926a205663a183b4521dff4b864a8 Mon Sep 17 00:00:00 2001 From: iwa Date: Thu, 11 Jun 2026 07:57:33 +0900 Subject: [PATCH] [WAYANG-768] Fix test initialization in JdbcJoinOperatorTest --- .../jdbc/operators/JdbcJoinOperatorTest.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/wayang-platforms/wayang-jdbc-template/src/test/java/org/apache/wayang/jdbc/operators/JdbcJoinOperatorTest.java b/wayang-platforms/wayang-jdbc-template/src/test/java/org/apache/wayang/jdbc/operators/JdbcJoinOperatorTest.java index ab984a751..875a7a47b 100644 --- a/wayang-platforms/wayang-jdbc-template/src/test/java/org/apache/wayang/jdbc/operators/JdbcJoinOperatorTest.java +++ b/wayang-platforms/wayang-jdbc-template/src/test/java/org/apache/wayang/jdbc/operators/JdbcJoinOperatorTest.java @@ -33,6 +33,7 @@ import org.apache.wayang.jdbc.execution.JdbcExecutor; import org.apache.wayang.core.profiling.NoInstrumentationStrategy; import org.apache.wayang.core.optimizer.DefaultOptimizationContext; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import java.sql.Connection; @@ -48,6 +49,21 @@ * Test suite for {@link SqlToStreamOperator}. */ class JdbcJoinOperatorTest extends OperatorTestBase { + @BeforeEach + void initDB() throws SQLException { + HsqldbPlatform hsqldbPlatform = new HsqldbPlatform(); + try ( + Connection jdbcConnection = hsqldbPlatform + .createDatabaseDescriptor(configuration) + .createJdbcConnection() + ) { + final Statement statement = jdbcConnection.createStatement(); + statement.execute("DROP TABLE IF EXISTS testA"); + statement.execute("DROP TABLE IF EXISTS testB"); + statement.execute("DROP TABLE IF EXISTS orders"); + statement.execute("DROP TABLE IF EXISTS shipments"); + } + } @Test void testWithHsqldb() throws SQLException { Configuration configuration = new Configuration();