HHH-13581 Disable tests involving MariaDB ConnectorJ's buggy ResultSet#getTime(int, Calendar) method

This commit is contained in:
Yoann Rodière 2019-08-26 16:29:34 +02:00 committed by gbadner
parent 74d35b2d59
commit debc5d37f8
2 changed files with 26 additions and 0 deletions

View File

@ -15,6 +15,7 @@ import java.sql.Types;
import java.time.LocalTime;
import java.time.ZoneId;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
@ -56,6 +57,18 @@ public class LocalTimeTest extends AbstractJavaTimeTypeTest<LocalTime, LocalTime
monthWhenPersistedWithoutHibernate, dayWhenPersistedWithoutHibernate
);
}
@Override
protected Iterable<? extends ZoneId> getHibernateJdbcTimeZonesToTest() {
// The MariaDB Connector/J JDBC driver has a bug in ResultSet#getTime(int, Calendar)
// that prevents our explicit JDBC timezones from being recognized
// See https://hibernate.atlassian.net/browse/HHH-13581
// See https://jira.mariadb.org/browse/CONJ-724
if ( MariaDBDialect.class.isInstance( getDialect() ) ) {
return Collections.emptySet();
}
return super.getHibernateJdbcTimeZonesToTest();
}
}
@Parameterized.Parameters(name = "{1}:{2}:{3}.{4} (JDBC write date: {5}-{6}-{7}) {0}")

View File

@ -17,6 +17,7 @@ import java.time.OffsetTime;
import java.time.ZoneId;
import java.time.ZoneOffset;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
@ -59,6 +60,18 @@ public class OffsetTimeTest extends AbstractJavaTimeTypeTest<OffsetTime, OffsetT
monthWhenPersistedWithoutHibernate, dayWhenPersistedWithoutHibernate
);
}
@Override
protected Iterable<? extends ZoneId> getHibernateJdbcTimeZonesToTest() {
// The MariaDB Connector/J JDBC driver has a bug in ResultSet#getTime(int, Calendar)
// that prevents our explicit JDBC timezones from being recognized
// See https://hibernate.atlassian.net/browse/HHH-13581
// See https://jira.mariadb.org/browse/CONJ-724
if ( MariaDBDialect.class.isInstance( getDialect() ) ) {
return Collections.emptySet();
}
return super.getHibernateJdbcTimeZonesToTest();
}
}
@Parameterized.Parameters(name = "{1}:{2}:{3}.{4}[{5}] (JDBC write date: {6}-{7}-{8}) {0}")