Skip to content

Commit

Permalink
SQL E2E compatible with com.mysql:mysql-connector-j:8.0 (#28874)
Browse files Browse the repository at this point in the history
  • Loading branch information
sandynz authored Oct 26, 2023
1 parent 71ceb39 commit 937a557
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ private void assertResultSet(final SingleE2EContainerComposer containerComposer,
}

private void assertResultSet(final SingleE2EContainerComposer containerComposer, final Statement statement, final String sql) throws SQLException {
try (ResultSet resultSet = statement.executeQuery(sql)) {
statement.execute(sql);
try (ResultSet resultSet = statement.getResultSet()) {
assertResultSet(containerComposer, resultSet);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ void assertExecute(final AssertionTestParameter testParam) throws SQLException {
}

private void assertExecute(final SingleE2EContainerComposer containerComposer) throws SQLException {
try (Connection connection = containerComposer.getTargetDataSource().getConnection()) {
try (
Statement statement = connection.createStatement();
ResultSet resultSet = statement.executeQuery(containerComposer.getSQL())) {
try (
Connection connection = containerComposer.getTargetDataSource().getConnection();
Statement statement = connection.createStatement()) {
statement.execute(containerComposer.getSQL());
try (ResultSet resultSet = statement.getResultSet()) {
assertResultSet(containerComposer, resultSet);
}
}
Expand Down

0 comments on commit 937a557

Please sign in to comment.