From c048ce73c8e65e68939c3fc928f17b857826c368 Mon Sep 17 00:00:00 2001 From: rusher Date: Thu, 10 Oct 2024 16:12:55 +0200 Subject: [PATCH] [test] collation test correction --- .../org/mariadb/jdbc/integration/ConfigurationTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/mariadb/jdbc/integration/ConfigurationTest.java b/src/test/java/org/mariadb/jdbc/integration/ConfigurationTest.java index 510c99acb..8d9434d79 100644 --- a/src/test/java/org/mariadb/jdbc/integration/ConfigurationTest.java +++ b/src/test/java/org/mariadb/jdbc/integration/ConfigurationTest.java @@ -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,