Skip to content

Commit

Permalink
Inline unneeded methods
Browse files Browse the repository at this point in the history
  • Loading branch information
losipiuk committed Sep 9, 2020
1 parent e15ff10 commit 4ad9ab9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
Expand All @@ -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()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
Expand All @@ -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)
{
Expand Down

0 comments on commit 4ad9ab9

Please sign in to comment.