Skip to content

[#901] removed failing assertion #930

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 30, 2021
Merged

Conversation

blafond
Copy link
Member

@blafond blafond commented Aug 4, 2021

Fixes #901

@blafond blafond requested a review from DavideD August 4, 2021 20:41
@DavideD
Copy link
Member

DavideD commented Aug 6, 2021

I have this exception on my machine:

Not equals : Z != +01:00
java.lang.AssertionError: Not equals : Z != +01:00
	at io.vertx.ext.unit.impl.TestContextImpl.reportAssertionError(TestContextImpl.java:362)
	at io.vertx.ext.unit.impl.TestContextImpl.assertEquals(TestContextImpl.java:258)
	at io.vertx.ext.unit.impl.TestContextImpl.assertEquals(TestContextImpl.java:245)
	at org.hibernate.reactive.UTCTest.lambda$testOffsetDateTime$5(UTCTest.java:122)

@blafond
Copy link
Member Author

blafond commented Aug 6, 2021

I changed my laptop time zone to different values and it does fail only on UTC+1

Fails in ZoneOffset.equals() on this check: return this.totalSeconds == ((ZoneOffset)obj).totalSeconds;
where this.totalSeconds is 0 and ((ZoneOffset)obj).totalSeconds is 3600

UTC+0, UTC+2 and all others work fine.

@DavideD
Copy link
Member

DavideD commented Aug 9, 2021

As usual, dealing with dates is a pain. Honestly, I don't have a solution at the moment.
I'm fine with just removing the assertion for now.

@blafond
Copy link
Member Author

blafond commented Aug 10, 2021

I removed the first assertion in that test. The complexity of time zone rules seems to prevent a reasonable/working check on zone offset.

@blafond blafond changed the title [#901] changed assert to compare to ZoneId.systemDefault() [#901] removed failing assertion Aug 10, 2021
@blafond blafond merged commit eec3a2e into hibernate:main Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UTCTest.testOffsetDateTime() test failure locally
2 participants