Skip to content

Conversation

@heapifyman
Copy link

@heapifyman heapifyman commented Dec 19, 2025

Test com.example.blog.RepositoriesTests#When findByIdOrNull then return Article fails because h2 truncates the nanoseconds when using the default TIMESTAMP:

expected: Article(title=Lorem, ..., addedAt=2025-12-19T10:06:11.297238501, id=1)
 but was: Article(title=Lorem, ..., addedAt=2025-12-19T10:06:11.297239, id=1)

Test `com.example.blog.RepositoriesTests#When findByIdOrNull then return
Article` fails because h2 truncates the nanoseconds when using the
default `TIMESTAMP`:

```
expected: Article(title=Lorem, headline=Lorem, content=dolor sit amet,
author=IdOnlyAggregateReference{id=1}, slug=lorem,
addedAt=2025-12-19T10:06:11.297238501, id=1)
 but was: Article(title=Lorem, headline=Lorem, content=dolor sit amet,
author=IdOnlyAggregateReference{id=1}, slug=lorem,
addedAt=2025-12-19T10:06:11.297239, id=1)
```

Signed-off-by: heapifyman <[email protected]>
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.

1 participant