From 77813b18c820b046a57106399712379ccf6b0529 Mon Sep 17 00:00:00 2001 From: Francesco Komauli Date: Thu, 1 Dec 2022 15:57:40 +0100 Subject: [PATCH] Integration test fails on JDK > 8 because of Instant resolution change [resolves #571] --- .../java/io/r2dbc/postgresql/AbstractCodecIntegrationTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/io/r2dbc/postgresql/AbstractCodecIntegrationTests.java b/src/test/java/io/r2dbc/postgresql/AbstractCodecIntegrationTests.java index 1cd585a2..daf3d648 100644 --- a/src/test/java/io/r2dbc/postgresql/AbstractCodecIntegrationTests.java +++ b/src/test/java/io/r2dbc/postgresql/AbstractCodecIntegrationTests.java @@ -435,7 +435,7 @@ void localDateTime() { testCodec(LocalDateTime.class, LocalDateTime.now().truncatedTo(ChronoUnit.MICROS), "TIMESTAMP"); testCodec(LocalDateTime.class, LocalDateTime.now().truncatedTo(ChronoUnit.MICROS), "TIMESTAMPTZ"); - Instant now = Instant.now(); + Instant now = Instant.now().truncatedTo(ChronoUnit.MICROS); LocalDateTime ldt = now.atZone(ZoneId.systemDefault()).toLocalDateTime(); testCodec(LocalDateTime.class, ldt, Instant.class, (actual, expected) -> {