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

exposed-java-time test cases are failing for sqlite #954

Closed
FlorianDold opened this issue Jun 13, 2020 · 1 comment
Closed

exposed-java-time test cases are failing for sqlite #954

FlorianDold opened this issue Jun 13, 2020 · 1 comment
Labels

Comments

@FlorianDold
Copy link

When I try to build the Exposed project, nine test cases in exposed-java-time are failing with similar errors. For example:

$ ./gradlew build
org.jetbrains.exposed.MiscTableTest > testInsert01 FAILED
    java.lang.AssertionError: Failed on sqlite expected:<2020-06-13T11:05:13.912006> but was:<2020-06-13T11:05:13.912>
[...]
org.jetbrains.exposed.MiscTableTest > testInsert02 FAILED
    java.lang.AssertionError: Failed on sqlite expected:<2020-06-13T11:05:13.949151> but was:<2020-06-13T11:05:13.949>
[...]
org.jetbrains.exposed.MiscTableTest > testUpdate02 FAILED
    java.lang.AssertionError: Failed on sqlite expected:<2020-06-13T11:05:14.263867> but was:<2020-06-13T11:05:14.263>
[...]

This is using the master branch, and running on Arch Linux with Java 11:

$ git show HEAD
commit fa97414eeacbfa28f60b7fb83795c4f7fdf92892 (HEAD -> master, origin/master, origin/HEAD)
Author: Andrey.Tarashevskiy <[email protected]>
Date:   Sat Jun 13 02:01:57 2020 +0300
[...]

$ java -version
openjdk version "11.0.7" 2020-04-14
OpenJDK Runtime Environment (build 11.0.7+10)
OpenJDK 64-Bit Server VM (build 11.0.7+10, mixed mode)
@Tapac Tapac added the datetime label Jun 14, 2020
Tapac added a commit that referenced this issue Jun 14, 2020
@Tapac
Copy link
Contributor

Tapac commented Jun 14, 2020

The problem was in Java 9+ where LocalDateTime contains 9 fractional digits while Java 8 only 3 (the same amount as SQLite).
I had changed comparison behavior in tests so it should work now.

@Tapac Tapac closed this as completed Jun 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants