From 3142333b19baac57507f674e98c5efce781be777 Mon Sep 17 00:00:00 2001 From: Piotr Findeisen Date: Fri, 15 Dec 2023 17:27:45 +0100 Subject: [PATCH] Migrate trino-record-decoder off TestNG assertions --- lib/trino-record-decoder/pom.xml | 6 ------ .../test/java/io/trino/decoder/util/DecoderTestUtil.java | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/trino-record-decoder/pom.xml b/lib/trino-record-decoder/pom.xml index 3ce83c8ff4b5..8c838108c22c 100644 --- a/lib/trino-record-decoder/pom.xml +++ b/lib/trino-record-decoder/pom.xml @@ -165,12 +165,6 @@ junit-jupiter-engine test - - - org.testng - testng - test - diff --git a/lib/trino-record-decoder/src/test/java/io/trino/decoder/util/DecoderTestUtil.java b/lib/trino-record-decoder/src/test/java/io/trino/decoder/util/DecoderTestUtil.java index 31b3a13dedea..61d5d190b74a 100644 --- a/lib/trino-record-decoder/src/test/java/io/trino/decoder/util/DecoderTestUtil.java +++ b/lib/trino-record-decoder/src/test/java/io/trino/decoder/util/DecoderTestUtil.java @@ -22,7 +22,7 @@ import java.util.Map; import static org.assertj.core.api.Assertions.assertThat; -import static org.testng.Assert.assertEquals; +import static org.assertj.core.data.Offset.offset; public final class DecoderTestUtil { @@ -55,7 +55,7 @@ public static void checkValue(Map decod { FieldValueProvider provider = decodedRow.get(handle); assertThat(provider).isNotNull(); - assertEquals(provider.getDouble(), value, 0.0001); + assertThat(provider.getDouble()).isCloseTo(value, offset(0.0001)); } public static void checkValue(Map decodedRow, DecoderColumnHandle handle, boolean value)