Skip to content

Commit

Permalink
[misc] test correction for mysql 8.0.28 that truncate timestamps / gi…
Browse files Browse the repository at this point in the history
…ve wrong microsecond results for SELECT ? commands
  • Loading branch information
diego Dupin committed Jan 21, 2022
1 parent cfc37b0 commit 8467bb0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/test/java/org/mariadb/jdbc/ScalarFunctionsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ public void scalarFctTest() throws SQLException {
if (!isMariadbServer()) {
cancelForVersion(5, 5);
}
cancelForVersion(8, 0, 28);
queryScalar("SELECT {fn convert(?, SQL_BIGINT)}", 2147483648L, 2147483648L);
queryScalar("SELECT {fn convert(?, SQL_BIGINT)}", BigInteger.valueOf(2147483648L), 2147483648L);
queryScalar("SELECT {fn convert(?, SQL_BIGINT)}", 20, new Object[] {20, 20L});
Expand Down
6 changes: 3 additions & 3 deletions src/test/java/org/mariadb/jdbc/SslTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,10 @@
import java.security.NoSuchAlgorithmException;
import java.sql.*;
import java.util.*;
import javax.net.ssl.SSLContext;
import org.junit.*;
import org.mariadb.jdbc.failover.TcpProxy;

import javax.net.ssl.SSLContext;

@SuppressWarnings("ResultOfMethodCallIgnored")
public class SslTest extends BaseTest {

Expand Down Expand Up @@ -167,7 +166,8 @@ public void mandatorySsl() throws SQLException {
@Test
public void enabledSslProtocolSuites() throws SQLException {
try {
List<String> protocols = Arrays.asList(SSLContext.getDefault().getSupportedSSLParameters().getProtocols());
List<String> protocols =
Arrays.asList(SSLContext.getDefault().getSupportedSSLParameters().getProtocols());
Assume.assumeTrue(protocols.contains("TLSv1.3") && protocols.contains("TLSv1.2"));
} catch (NoSuchAlgorithmException e) {
// eat
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ public void tearDown() {
@Test
public void testTimeStamp() throws SQLException {
Assume.assumeTrue(System.getenv("AURORA") == null && !"skysql-ha".equals(System.getenv("srv")));
cancelForVersion(8, 0, 28);
TimeZone.setDefault(parisTimeZone);
try (Connection connection =
setConnection("&serverTimezone=Europe/Paris&useServerPrepStmts=true")) {
Expand All @@ -235,7 +236,7 @@ public void testTimeStamp() throws SQLException {

@Test
public void testTimeStampUtc() throws SQLException {

cancelForVersion(8, 0, 28);
TimeZone.setDefault(parisTimeZone);
try (Connection connection = setConnection("&serverTimezone=UTC&useServerPrepStmts=true")) {
setSessionTimeZone(connection, "+00:00");
Expand Down

0 comments on commit 8467bb0

Please sign in to comment.