Skip to content

Commit

Permalink
[misc] parsec SSL fingerprint test correction
Browse files Browse the repository at this point in the history
  • Loading branch information
rusher committed Nov 14, 2024
1 parent da6a56c commit 147a08a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions src/test/java/org/mariadb/jdbc/integration/Common.java
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,19 @@ public boolean isWindows() {
return System.getProperty("os.name").toLowerCase().contains("win");
}

public int getJavaVersion() {
String version = System.getProperty("java.version");
if (version.startsWith("1.")) {
version = version.substring(2, 3);
} else {
int dot = version.indexOf(".");
if (dot != -1) {
version = version.substring(0, dot);
}
}
return Integer.parseInt(version);
}

public void cancelForVersion(int major, int minor) {
String dbVersion = sharedConn.getMetaData().getDatabaseProductVersion();
Assumptions.assumeFalse(dbVersion.startsWith(major + "." + minor));
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/mariadb/jdbc/integration/SslTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public void mandatoryEphemeralSsled25519() throws SQLException {
@Test
public void mandatoryEphemeralSslParsec() throws SQLException {
Assumptions.assumeTrue(!"maxscale".equals(System.getenv("srv")));
Assumptions.assumeTrue(isMariaDBServer() && minVersion(11, 6, 1));
Assumptions.assumeTrue(isMariaDBServer() && minVersion(11, 6, 1) && getJavaVersion() >= 15);

Statement stmt = sharedConn.createStatement();
try {
Expand Down

0 comments on commit 147a08a

Please sign in to comment.