Skip to content

Commit

Permalink
Always use fixed TIME as session base in TestDateTimeFunctions
Browse files Browse the repository at this point in the history
Using this will allow to write simpler tests and avoid intermittent
error caused by DST or changes in time zone policies.

Without this change some test would require to rewrite to much logic
from implementation making them less usefull.
  • Loading branch information
fiedukow authored and findepi committed Jun 27, 2018
1 parent fdd4598 commit 824baf0
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ protected TestDateTimeFunctionsBase(boolean legacyTimestamp)
super(testSessionBuilder()
.setSystemProperty("legacy_timestamp", String.valueOf(legacyTimestamp))
.setTimeZoneKey(TIME_ZONE_KEY)
.setStartTime(new DateTime(2017, 04, 01, 12, 34, 56, 789, UTC_TIME_ZONE).getMillis())
.build());
TIMESTAMP = legacyTimestamp ? LEGACY_TIMESTAMP : NEW_TIMESTAMP;
}
Expand Down

0 comments on commit 824baf0

Please sign in to comment.