diff --git a/driver/src/test/java/com/impossibl/postgres/jdbc/SSLDataSourceTest.java b/driver/src/test/java/com/impossibl/postgres/jdbc/SSLDataSourceTest.java index 7a47858f3..b21281185 100644 --- a/driver/src/test/java/com/impossibl/postgres/jdbc/SSLDataSourceTest.java +++ b/driver/src/test/java/com/impossibl/postgres/jdbc/SSLDataSourceTest.java @@ -246,7 +246,7 @@ private static Collection testData(Properties prop, String param) { static { String PG_HBA_ON = "Connection Error: no pg_hba.conf entry for host .*, user .*, database .*, SSL on(?s-d:.*)"; String PG_HBA_OFF = "Connection Error: no pg_hba.conf entry for host .*, user .*, database .*, SSL off(?s-d:.*)"; - String BROKEN = "Connection Error: SSL Error: Received fatal alert: unknown_ca"; + String BROKEN = "Connection Error: (Channel Closed|SSL Error: Received fatal alert: unknown_ca)"; String ANY = ".*"; String VALIDATOR = "Connection Error: SSL Error: PKIX path (building|validation) failed:.*"; String HOSTNAME = "Connection Error: SSL Error: Hostname .* could not be verified"; diff --git a/driver/src/test/java/com/impossibl/postgres/jdbc/SSLTest.java b/driver/src/test/java/com/impossibl/postgres/jdbc/SSLTest.java index 390ba5eba..1861b5d96 100644 --- a/driver/src/test/java/com/impossibl/postgres/jdbc/SSLTest.java +++ b/driver/src/test/java/com/impossibl/postgres/jdbc/SSLTest.java @@ -139,7 +139,7 @@ protected void driver(String connstr, Object[] expected) { else { StringWriter trace = new StringWriter(); ex.printStackTrace(new PrintWriter(trace)); - assertTrue("Unexpected Exception Message: " + ex.getMessage() + "\nfrom\n" + trace.toString(), ex.getMessage().matches(exmsg)); + assertTrue("Unexpected Exception Message: " + ex.getMessage() + "\nexpected: " + exmsg + "\nfrom\n" + trace.toString(), ex.getMessage().matches(exmsg)); } } } @@ -209,7 +209,7 @@ private static Collection testData(Properties prop, String param) thro static { String PG_HBA_ON = "Connection Error: no pg_hba.conf entry for host .*, user .*, database .*, SSL on(?s-d:.*)"; String PG_HBA_OFF = "Connection Error: no pg_hba.conf entry for host .*, user .*, database .*, SSL off(?s-d:.*)"; - String BROKEN = "Connection Error: SSL Error: Received fatal alert: unknown_ca"; + String BROKEN = "Connection Error: (Channel Closed|SSL Error: Received fatal alert: unknown_ca)"; String ANY = ".*"; String VALIDATOR = "Connection Error: SSL Error: PKIX path (building|validation) failed:.*"; String HOSTNAME = "Connection Error: SSL Error: Hostname .* could not be verified";