Skip to content

Commit

Permalink
[misc] test addition using wrongly client certificate
Browse files Browse the repository at this point in the history
  • Loading branch information
rusher committed Mar 9, 2022
1 parent a370827 commit de81b30
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions src/test/java/org/mariadb/jdbc/integration/Common.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,19 @@ public static boolean isMariaDBServer() {
return sharedConn.getContext().getVersion().isMariaDBServer();
}

public static boolean runLongTest() {
return !isXpand();
}

public static boolean isXpand() {
return sharedConn.getContext().getVersion().isMariaDBServer()
&& sharedConn.getContext().getVersion().getQualifier().toLowerCase().contains("xpand");
}

public static boolean supportSequenceTable() {
return sharedConn.getContext().getVersion().isMariaDBServer() && !isXpand();
}

public static boolean minVersion(int major, int minor, int patch) {
return sharedConn.getContext().getVersion().versionGreaterOrEqual(major, minor, patch);
}
Expand Down Expand Up @@ -127,12 +140,13 @@ public Connection createProxyCon(HaMode mode, String opts) throws SQLException {
public static boolean haveSsl() throws SQLException {
Statement stmt = sharedConn.createStatement();
ResultSet rs = stmt.executeQuery("show variables like '%ssl%'");
// while (rs.next()) {
// System.out.println(rs.getString(1) + ":" + rs.getString(2));
// }
while (rs.next()) {
System.out.println(rs.getString(1) + ":" + rs.getString(2));
}

rs = stmt.executeQuery("select @@have_ssl");
assertTrue(rs.next());
System.out.println("have ssl:" + rs.getString(1));
return "YES".equals(rs.getString(1));
}

Expand Down

0 comments on commit de81b30

Please sign in to comment.