Skip to content

Commit

Permalink
[test] collation test correction
Browse files Browse the repository at this point in the history
  • Loading branch information
rusher committed Oct 10, 2024
1 parent b369ace commit c048ce7
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,16 @@ public void connectionCollationTest() throws SQLException {
ResultSet rs =
stmt.executeQuery("SELECT @@global.COLLATION_CONNECTION, @@session.COLLATION_CONNECTION");
rs.next();
assertEquals(rs.getString(2), rs.getString(1));
// could be different, because charset default might differ from server default
assertTrue(rs.getString(2).equals(rs.getString(1)) || "utf8mb4_unicode_ci".equals(rs.getString(1)));
}

Statement stmt = sharedConn.createStatement();
ResultSet rs =
stmt.executeQuery("SELECT @@global.COLLATION_CONNECTION, @@session.COLLATION_CONNECTION");
rs.next();
assertEquals(rs.getString(2), rs.getString(1));
// could be different, because charset default might differ from server default
assertTrue(rs.getString(2).equals(rs.getString(1)) || "utf8mb4_unicode_ci".equals(rs.getString(1)));

assertThrowsContains(
SQLException.class,
Expand Down

0 comments on commit c048ce7

Please sign in to comment.