Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import static org.hibernate.cfg.AvailableSettings.TIMEZONE_DEFAULT_STORAGE;
import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.DB2;
import static org.hibernate.reactive.testing.ReactiveAssertions.assertWithTruncationThat;
import static org.hibernate.type.descriptor.DateTimeUtils.roundToDefaultPrecision;
import static org.hibernate.type.descriptor.DateTimeUtils.adjustToDefaultPrecision;

@Timeout(value = 10, timeUnit = MINUTES)
@DisabledFor(value = DB2, reason = "Exception: IllegalStateException: Needed to have 6 in buffer but only had 0")
Expand Down Expand Up @@ -60,10 +60,10 @@ public void test(VertxTestContext context) {
.thenCompose( zid -> openSession()
.thenCompose( s -> s.find( Zoned.class, zid )
.thenAccept( z -> {
assertWithTruncationThat( roundToDefaultPrecision( z.zonedDateTime.toInstant(), getDialect() ) )
.isEqualTo( roundToDefaultPrecision( nowZoned.toInstant(), getDialect() ) );
assertWithTruncationThat( roundToDefaultPrecision( z.offsetDateTime.toInstant(), getDialect() ) )
.isEqualTo( roundToDefaultPrecision( nowOffset.toInstant(), getDialect() ) );
assertWithTruncationThat( adjustToDefaultPrecision( z.zonedDateTime.toInstant(), getDialect() ) )
.isEqualTo( adjustToDefaultPrecision( nowZoned.toInstant(), getDialect() ) );
assertWithTruncationThat( adjustToDefaultPrecision( z.offsetDateTime.toInstant(), getDialect() ) )
.isEqualTo( adjustToDefaultPrecision( nowOffset.toInstant(), getDialect() ) );
assertThat( z.offsetDateTime.getOffset() ).isEqualTo( ZoneId.of( "Z" ) );
assertThat( z.zonedDateTime.getZone() ).isEqualTo( ZoneOffset.ofHours( 0 ) );
} )
Expand Down
Loading