Skip to content
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

TestCustomMappingInstant.test_instant fails to compare Instants #227

Open
pgrt opened this issue Dec 4, 2024 · 0 comments
Open

TestCustomMappingInstant.test_instant fails to compare Instants #227

pgrt opened this issue Dec 4, 2024 · 0 comments

Comments

@pgrt
Copy link

pgrt commented Dec 4, 2024

Hi,

I am working on the packaging of json-smart-v2 in Debian. I sumbled upon this test failure with version 2.5.1:

org.opentest4j.AssertionFailedError: expected: <2024-12-03T21:38:43.227Z> but was: <2024-12-03T21:38:43.227660582Z>
at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197)
at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:182)
at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:177)
at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1145)
at net.minidev.json.testMapping.TestCustomMappingInstant.test_instant(TestCustomMappingInstant.java:62)

Comparing Instants using toEpochMilli() avoids this error, but maybe this is something you would like to address.

All the best,

Pierre

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

No branches or pull requests

1 participant