Skip to content

Commit 595559b

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. Also reduced logging in tests again.
1 parent fe181b2 commit 595559b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

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

+3-1
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

spring-data-jdbc/src/test/resources/logback.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</appender>
99

1010
<!--<logger name="org.springframework.data" level="info" />-->
11-
<logger name="org.springframework.jdbc.core" level="trace" />
11+
<!--<logger name="org.springframework.jdbc.core" level="trace" />-->
1212
<!--<logger name="org.springframework.data.jdbc.mybatis.DummyEntityMapper" level="trace" />-->
1313

1414
<root level="warn">

0 commit comments

Comments
 (0)