@@ -1718,7 +1718,7 @@ public void testBug23626() throws Exception {
1718
1718
* if the test fails.
1719
1719
*/
1720
1720
public void testBug25545() throws Exception {
1721
- if (!versionMeetsMinimum(5, 0)) {
1721
+ if (!versionMeetsMinimum(5, 0) || (!versionMeetsMinimum(5, 5) && !Util.jvmMeetsMinimum(8, 0)) ) {
1722
1722
return;
1723
1723
}
1724
1724
@@ -1758,6 +1758,9 @@ public void testBug25545() throws Exception {
1758
1758
* if the test fails.
1759
1759
*/
1760
1760
public void testBug36948() throws Exception {
1761
+ if (!versionMeetsMinimum(5, 5)) {
1762
+ return;
1763
+ }
1761
1764
Connection _conn = null;
1762
1765
1763
1766
try {
@@ -7538,7 +7541,7 @@ private void testBug71084AssertCase(Properties connProps, String clientTZ, Strin
7538
7541
* if the test fails.
7539
7542
*/
7540
7543
public void testBug20685022() throws Exception {
7541
- if (!isCommunityEdition()) {
7544
+ if (!isCommunityEdition() || !versionMeetsMinimum(5, 5) ) {
7542
7545
return;
7543
7546
}
7544
7547
@@ -8340,6 +8343,10 @@ public SQLException interceptException(SQLException sqlEx, com.mysql.jdbc.Connec
8340
8343
* if the test fails.
8341
8344
*/
8342
8345
public void testBug21947042() throws Exception {
8346
+ if (!versionMeetsMinimum(5, 5)) {
8347
+ return;
8348
+ }
8349
+
8343
8350
Connection sslConn = null;
8344
8351
Properties props = new Properties();
8345
8352
props.setProperty("logger", BufferingLogger.class.getName());
@@ -8535,6 +8542,9 @@ public ResultSetInternalMethods preProcess(String sql, com.mysql.jdbc.Statement
8535
8542
* Test certificates from testsuite/ssl-test-certs must be installed on both servers.
8536
8543
*/
8537
8544
public void testTLSVersion() throws Exception {
8545
+ if (!versionMeetsMinimum(5, 5) && !Util.jvmMeetsMinimum(8, 0)) {
8546
+ return;
8547
+ }
8538
8548
// Find out which TLS protocol versions are supported by this JVM.
8539
8549
SSLContext sslContext = SSLContext.getInstance("TLS");
8540
8550
sslContext.init(null, null, null);
@@ -8582,6 +8592,9 @@ public void testTLSVersion() throws Exception {
8582
8592
System.out.println("Highest common TLS protocol: " + highestCommonTlsVersion);
8583
8593
8584
8594
assertEquals(highestCommonTlsVersion, tlsVersionUsed);
8595
+ } else if (((MySQLConnection) sslConn).versionMeetsMinimum(5, 6, 46)) {
8596
+ assertEquals(jvmSupportedProtocols.contains("TLSv1.2") ? "TLSv1.2" : jvmSupportedProtocols.contains("TLSv1.1") ? "TLSv1.1" : "TLSv1",
8597
+ tlsVersionUsed);
8585
8598
} else {
8586
8599
assertEquals("TLSv1", tlsVersionUsed);
8587
8600
}
@@ -8602,6 +8615,9 @@ public void testTLSVersion() throws Exception {
8602
8615
* Test certificates from testsuite/ssl-test-certs must be installed on both servers.
8603
8616
*/
8604
8617
public void testEnableTLSVersion() throws Exception {
8618
+ if (!versionMeetsMinimum(5, 5)) {
8619
+ return;
8620
+ }
8605
8621
// Find out which TLS protocol versions are supported by this JVM.
8606
8622
SSLContext sslContext = SSLContext.getInstance("TLS");
8607
8623
sslContext.init(null, null, null);
@@ -8637,6 +8653,11 @@ public void testEnableTLSVersion() throws Exception {
8637
8653
System.out.println("Server supports TLS protocols: " + serverSupportedProtocols);
8638
8654
commonSupportedProtocols.addAll(serverSupportedProtocols);
8639
8655
commonSupportedProtocols.retainAll(jvmSupportedProtocols);
8656
+ } else if (((MySQLConnection) sslConn).versionMeetsMinimum(5, 6, 46) && !((MySQLConnection) sslConn).versionMeetsMinimum(5, 7, 0)) {
8657
+ commonSupportedProtocols.add("TLSv1");
8658
+ commonSupportedProtocols.add("TLSv1.1");
8659
+ commonSupportedProtocols.add("TLSv1.2");
8660
+ commonSupportedProtocols.retainAll(jvmSupportedProtocols);
8640
8661
} else {
8641
8662
commonSupportedProtocols.add("TLSv1");
8642
8663
}
@@ -10153,6 +10174,10 @@ public void testBug70785() throws Exception {
10153
10174
* packets flow faster and desynchronization occurs rarely, which is the root cause for this problem.
10154
10175
*/
10155
10176
public void testBug88242() throws Exception {
10177
+ if (!versionMeetsMinimum(5, 5)) {
10178
+ return;
10179
+ }
10180
+
10156
10181
Properties props = new Properties();
10157
10182
props.setProperty("useSSL", "true");
10158
10183
props.setProperty("verifyServerCertificate", "false");
0 commit comments