From 4ad9ab9ccbfec075e4f2bb952e18781d21bf2b9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Osipiuk?= Date: Wed, 9 Sep 2020 13:42:25 +0200 Subject: [PATCH] Inline unneeded methods --- .../plugin/oracle/TestOracleTypeMapping.java | 18 ++++++------------ .../postgresql/TestPostgreSqlTypeMapping.java | 18 ++++++------------ 2 files changed, 12 insertions(+), 24 deletions(-) diff --git a/presto-oracle/src/test/java/io/prestosql/plugin/oracle/TestOracleTypeMapping.java b/presto-oracle/src/test/java/io/prestosql/plugin/oracle/TestOracleTypeMapping.java index 7baf0bb03a0b..abd4a7a8f26c 100644 --- a/presto-oracle/src/test/java/io/prestosql/plugin/oracle/TestOracleTypeMapping.java +++ b/presto-oracle/src/test/java/io/prestosql/plugin/oracle/TestOracleTypeMapping.java @@ -711,13 +711,12 @@ public void testTimestamp(boolean insertWithPresto, ZoneId sessionZone) .addRoundTrip(timestampDataType(), beforeEpoch) .addRoundTrip(timestampDataType(), afterEpoch) .addRoundTrip(timestampDataType(), timeDoubledInJvmZone) - .addRoundTrip(timestampDataType(), timeDoubledInVilnius); - - addTimestampTestIfSupported(tests, epoch); // epoch also is a gap in JVM zone - addTimestampTestIfSupported(tests, timeGapInJvmZone1); - addTimestampTestIfSupported(tests, timeGapInJvmZone2); - addTimestampTestIfSupported(tests, timeGapInVilnius); - addTimestampTestIfSupported(tests, timeGapInKathmandu); + .addRoundTrip(timestampDataType(), timeDoubledInVilnius) + .addRoundTrip(timestampDataType(), epoch) // epoch also is a gap in JVM zone + .addRoundTrip(timestampDataType(), timeGapInJvmZone1) + .addRoundTrip(timestampDataType(), timeGapInJvmZone2) + .addRoundTrip(timestampDataType(), timeGapInVilnius) + .addRoundTrip(timestampDataType(), timeGapInKathmandu); Session session = Session.builder(getQueryRunner().getDefaultSession()) .setTimeZoneKey(getTimeZoneKey(sessionZone.getId())) @@ -731,11 +730,6 @@ public void testTimestamp(boolean insertWithPresto, ZoneId sessionZone) } } - private static void addTimestampTestIfSupported(DataTypeTest tests, LocalDateTime dateTime) - { - tests.addRoundTrip(timestampDataType(), dateTime); - } - @DataProvider public Object[][] testTimestampDataProvider() { diff --git a/presto-postgresql/src/test/java/io/prestosql/plugin/postgresql/TestPostgreSqlTypeMapping.java b/presto-postgresql/src/test/java/io/prestosql/plugin/postgresql/TestPostgreSqlTypeMapping.java index 93865acc8c87..6d1bbf69a30a 100644 --- a/presto-postgresql/src/test/java/io/prestosql/plugin/postgresql/TestPostgreSqlTypeMapping.java +++ b/presto-postgresql/src/test/java/io/prestosql/plugin/postgresql/TestPostgreSqlTypeMapping.java @@ -1009,13 +1009,12 @@ public void testTimestamp(boolean insertWithPresto, ZoneId sessionZone) .addRoundTrip(timestampDataType(), beforeEpoch) .addRoundTrip(timestampDataType(), afterEpoch) .addRoundTrip(timestampDataType(), timeDoubledInJvmZone) - .addRoundTrip(timestampDataType(), timeDoubledInVilnius); - - addTimestampTestIfSupported(tests, epoch); // epoch also is a gap in JVM zone - addTimestampTestIfSupported(tests, timeGapInJvmZone1); - addTimestampTestIfSupported(tests, timeGapInJvmZone2); - addTimestampTestIfSupported(tests, timeGapInVilnius); - addTimestampTestIfSupported(tests, timeGapInKathmandu); + .addRoundTrip(timestampDataType(), timeDoubledInVilnius) + .addRoundTrip(timestampDataType(), epoch) // epoch also is a gap in JVM zone + .addRoundTrip(timestampDataType(), timeGapInJvmZone1) + .addRoundTrip(timestampDataType(), timeGapInJvmZone2) + .addRoundTrip(timestampDataType(), timeGapInVilnius) + .addRoundTrip(timestampDataType(), timeGapInKathmandu); Session session = Session.builder(getQueryRunner().getDefaultSession()) .setTimeZoneKey(TimeZoneKey.getTimeZoneKey(sessionZone.getId())) @@ -1029,11 +1028,6 @@ public void testTimestamp(boolean insertWithPresto, ZoneId sessionZone) } } - private void addTimestampTestIfSupported(DataTypeTest tests, LocalDateTime dateTime) - { - tests.addRoundTrip(timestampDataType(), dateTime); - } - @Test(dataProvider = "testTimestampDataProvider") public void testArrayTimestamp(boolean insertWithPresto, ZoneId sessionZone) {