Skip to content

Commit 5ba898f

Browse files
committed
DATAJDBC-484 - Fixes a JDK dependent test failure.
Beginning from JDK 10 `Instant` uses nanosecond precision which doesn't make it through the database. This caused the test to fail. This fix fixes only the test by making the assertion more lenient. Actually storing and retrieving nanosecond precision time values is a separate issue.
1 parent fe181b2 commit 5ba898f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryIntegrationTests.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,9 @@ public void executeQueryWithParameterRequiringConversion() {
278278

279279
repository.saveAll(asList(first, second));
280280

281-
assertThat(repository.after(now)).containsExactly(second);
281+
assertThat(repository.after(now)) //
282+
.extracting(DummyEntity::getName) //
283+
.containsExactly("second");
282284
}
283285

284286
@Test // DATAJDBC-234

0 commit comments

Comments
 (0)