HHH-13558 : InstantTest, LocalDateTimeTest, OffsetDateTimeTest, ZonedDateTimeTest failing on Sybase for year 1600

This commit is contained in:
Gail Badner 2019-08-12 21:30:20 -07:00
parent 1b06b76e17
commit 3583074619
4 changed files with 24 additions and 0 deletions

View File

@ -24,6 +24,7 @@ import javax.persistence.Id;
import org.hibernate.dialect.MariaDBDialect;
import org.hibernate.dialect.MySQLDialect;
import org.hibernate.dialect.SybaseDialect;
import org.junit.runners.Parameterized;
@ -64,6 +65,11 @@ public class InstantTest extends AbstractJavaTimeTypeTest<Instant, InstantTest.E
.add( 1892, 1, 1, 0, 0, 0, 0, ZONE_OSLO )
.add( 1899, 12, 31, 23, 59, 59, 999_999_999, ZONE_PARIS )
.add( 1899, 12, 31, 23, 59, 59, 999_999_999, ZONE_AMSTERDAM )
)
.skippedForDialects(
// MySQL/Mariadb/Sybase cannot store dates in 1600 in a timestamp.
Arrays.asList( MySQLDialect.class, MariaDBDialect.class, SybaseDialect.class ),
b -> b
.add( 1600, 1, 1, 0, 0, 0, 0, ZONE_AMSTERDAM )
)
// HHH-13379: DST end (where Timestamp becomes ambiguous, see JDK-4312621)

View File

@ -21,6 +21,7 @@ import javax.persistence.Id;
import org.hibernate.dialect.MariaDBDialect;
import org.hibernate.dialect.MySQLDialect;
import org.hibernate.dialect.SybaseDialect;
import org.junit.runners.Parameterized;
@ -59,6 +60,11 @@ public class LocalDateTimeTest extends AbstractJavaTimeTypeTest<LocalDateTime, L
.add( 1892, 1, 1, 0, 0, 0, 0, ZONE_OSLO )
.add( 1900, 1, 1, 0, 9, 20, 0, ZONE_PARIS )
.add( 1900, 1, 1, 0, 19, 31, 0, ZONE_AMSTERDAM )
)
.skippedForDialects(
// MySQL/Mariadb/Sybase cannot store dates in 1600 in a timestamp.
Arrays.asList( MySQLDialect.class, MariaDBDialect.class, SybaseDialect.class ),
b -> b
.add( 1600, 1, 1, 0, 0, 0, 0, ZONE_AMSTERDAM )
)
// HHH-13379: DST end (where Timestamp becomes ambiguous, see JDK-4312621)

View File

@ -25,6 +25,7 @@ import javax.persistence.Id;
import org.hibernate.Query;
import org.hibernate.dialect.MariaDBDialect;
import org.hibernate.dialect.MySQLDialect;
import org.hibernate.dialect.SybaseDialect;
import org.hibernate.type.OffsetDateTimeType;
import org.hibernate.testing.TestForIssue;
@ -91,6 +92,11 @@ public class OffsetDateTimeTest extends AbstractJavaTimeTypeTest<OffsetDateTime,
.add( 1900, 1, 1, 0, 9, 20, 0, "+00:09:21", ZONE_PARIS )
.add( 1900, 1, 1, 0, 19, 31, 0, "+00:19:32", ZONE_PARIS )
.add( 1900, 1, 1, 0, 19, 31, 0, "+00:19:32", ZONE_AMSTERDAM )
)
.skippedForDialects(
// MySQL/Mariadb/Sybase cannot store dates in 1600 in a timestamp.
Arrays.asList( MySQLDialect.class, MariaDBDialect.class, SybaseDialect.class ),
b -> b
.add( 1600, 1, 1, 0, 0, 0, 0, "+00:19:32", ZONE_AMSTERDAM )
)
// HHH-13379: DST end (where Timestamp becomes ambiguous, see JDK-4312621)

View File

@ -25,6 +25,7 @@ import javax.persistence.Id;
import org.hibernate.Query;
import org.hibernate.dialect.MariaDBDialect;
import org.hibernate.dialect.MySQLDialect;
import org.hibernate.dialect.SybaseDialect;
import org.hibernate.type.ZonedDateTimeType;
import org.hibernate.testing.TestForIssue;
@ -102,6 +103,11 @@ public class ZonedDateTimeTest extends AbstractJavaTimeTypeTest<ZonedDateTime, Z
.add( 1900, 1, 1, 0, 19, 31, 0, "GMT+00:19:32", ZONE_PARIS )
.add( 1900, 1, 1, 0, 19, 31, 0, "GMT+00:19:32", ZONE_AMSTERDAM )
.add( 1900, 1, 1, 0, 19, 31, 0, "Europe/Amsterdam", ZONE_AMSTERDAM )
)
.skippedForDialects(
// MySQL/Mariadb/Sybase cannot store dates in 1600 in a timestamp.
Arrays.asList( MySQLDialect.class, MariaDBDialect.class, SybaseDialect.class ),
b -> b
.add( 1600, 1, 1, 0, 0, 0, 0, "GMT+00:19:32", ZONE_AMSTERDAM )
.add( 1600, 1, 1, 0, 0, 0, 0, "Europe/Amsterdam", ZONE_AMSTERDAM )
)