Skip to content

Commit

Permalink
merge dev and fix some conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
liugddx committed Sep 9, 2022
1 parent 2fcac6c commit 4d37d02
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
1 change: 0 additions & 1 deletion seatunnel-connectors-v2/connector-jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>${sqlserver.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>${sqlserver.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import org.testcontainers.containers.MSSQLServerContainer;
import org.testcontainers.containers.output.Slf4jLogConsumer;
import org.testcontainers.lifecycle.Startables;
import org.testcontainers.shaded.com.google.common.collect.Lists;
import org.testcontainers.shaded.org.awaitility.Awaitility;
import org.testcontainers.utility.DockerImageName;

Expand All @@ -39,7 +38,6 @@
import java.sql.SQLException;
import java.sql.Statement;
import java.time.Duration;
import java.util.List;
import java.util.stream.Stream;

@Slf4j
Expand All @@ -59,7 +57,7 @@ public void startSqlServerContainer() throws ClassNotFoundException, SQLExceptio
Class.forName(mssqlServerContainer.getDriverClassName());
Awaitility.given().ignoreExceptions()
.await()
.atMost(Duration.ofMinutes(1))
.atMost(Duration.ofMinutes(3))
.untilAsserted(this::initializeJdbcTable);
batchInsertData();
}
Expand Down Expand Up @@ -126,15 +124,12 @@ public void tesSqlserverSourceAndSink() throws SQLException, IOException, Interr
Container.ExecResult execResult = executeSeaTunnelSparkJob("/jdbc/jdbc_sqlserver_source_to_sink.conf");
Assertions.assertEquals(0, execResult.getExitCode());
// query result
String sql = "select * from sink";
String sql = "select * from sink minus select * from source;";
try (Connection connection = DriverManager.getConnection(mssqlServerContainer.getJdbcUrl(), mssqlServerContainer.getUsername(), mssqlServerContainer.getPassword())) {
Statement statement = connection.createStatement();
ResultSet resultSet = statement.executeQuery(sql);
List<String> result = Lists.newArrayList();
while (resultSet.next()) {
result.add(resultSet.getString("ids"));
}
Assertions.assertFalse(result.isEmpty());
Assertions.assertTrue(resultSet.next());

}
}

Expand Down

0 comments on commit 4d37d02

Please sign in to comment.