From c3d633dd2f4786da6385354ac5beba2805f5cf33 Mon Sep 17 00:00:00 2001 From: Sergey Nuyanzin Date: Sun, 19 Oct 2025 03:02:42 +0200 Subject: [PATCH] [hotfix] Fix unstable test IcebergRecordReaderTest#testReadLogTable --- .../lake/iceberg/source/IcebergRecordReaderTest.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/fluss-lake/fluss-lake-iceberg/src/test/java/org/apache/fluss/lake/iceberg/source/IcebergRecordReaderTest.java b/fluss-lake/fluss-lake-iceberg/src/test/java/org/apache/fluss/lake/iceberg/source/IcebergRecordReaderTest.java index bcf559348a..0ae2c049cf 100644 --- a/fluss-lake/fluss-lake-iceberg/src/test/java/org/apache/fluss/lake/iceberg/source/IcebergRecordReaderTest.java +++ b/fluss-lake/fluss-lake-iceberg/src/test/java/org/apache/fluss/lake/iceberg/source/IcebergRecordReaderTest.java @@ -61,6 +61,7 @@ import java.time.LocalDateTime; import java.time.OffsetDateTime; import java.time.ZoneOffset; +import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.List; @@ -217,8 +218,14 @@ private List writeFullTypeRows( record.setField("small_int", i % 32768); record.setField("float_val", 100.5f + i); record.setField("decimal_val", new BigDecimal(i + 100.25)); - record.setField("timestamp_ntz", LocalDateTime.now()); - record.setField("timestamp_ltz", OffsetDateTime.now(ZoneOffset.UTC)); + record.setField( + "timestamp_ntz", + LocalDateTime.of(2025, 10, 18, 10, 10, 10, 1000 * i) + .truncatedTo(ChronoUnit.MICROS)); + record.setField( + "timestamp_ltz", + OffsetDateTime.of(2025, 10, 18, 10, 10, 10, 1000 * i, ZoneOffset.UTC) + .truncatedTo(ChronoUnit.MICROS)); record.setField("binary_data", ByteBuffer.wrap("Hello World!".getBytes())); record.setField("char_data", "char_" + i); record.setField("dt", partition);