From b0967f182bec2dd17b8333fecc66264991fb448c Mon Sep 17 00:00:00 2001 From: injectives <11927660+injectives@users.noreply.github.com> Date: Tue, 18 Jan 2022 20:48:15 +0200 Subject: [PATCH] Exclude US/Pacific-New from randomized timezones (#1120) * Exclude US/Pacific-New from randomized timezones. (#1105) * Update driver/src/test/java/org/neo4j/driver/util/TemporalUtil.java Co-authored-by: Florent Biville <445792+fbiville@users.noreply.github.com> Co-authored-by: Michael Simons Co-authored-by: Florent Biville <445792+fbiville@users.noreply.github.com> --- driver/src/test/java/org/neo4j/driver/util/TemporalUtil.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/driver/src/test/java/org/neo4j/driver/util/TemporalUtil.java b/driver/src/test/java/org/neo4j/driver/util/TemporalUtil.java index ce2396e973..892fb34aad 100644 --- a/driver/src/test/java/org/neo4j/driver/util/TemporalUtil.java +++ b/driver/src/test/java/org/neo4j/driver/util/TemporalUtil.java @@ -54,13 +54,14 @@ public final class TemporalUtil * For example "Canada/East-Saskatchewan" will be returned as "Canada/Saskatchewan". * Other time zones are not working correctly in some Java versions */ - private static final List BLACKLISTED_ZONE_IDS = Arrays.asList( + private static final List EXCLUDED_ZONE_IDS = Arrays.asList( "Canada/East-Saskatchewan", "Chile/EasterIsland", "Africa/Casablanca", "tzid", "Asia/Qostanay", "America/Santiago",// Can cause flakyness on windows, see https://stackoverflow.com/questions/37533796/java-calendar-returns-wrong-hour-in-ms-windows-for-america-santiago-zone. + "US/Pacific-New", // Appeared out of nowhere in windows, does not test reliable "org.neo4j.driver.exceptions.ClientException: Unable to construct ZonedDateTime value: `Unknown time-zone ID: US/Pacific-New`" "Pacific/Easter" ); @@ -128,7 +129,7 @@ private static ZoneId randomZoneId() { Set availableZoneIds = ZoneId.getAvailableZoneIds() .stream() - .filter( id -> !BLACKLISTED_ZONE_IDS.contains( id ) ) + .filter( id -> !EXCLUDED_ZONE_IDS.contains( id ) ) .collect( toSet() ); int randomIndex = random().nextInt( availableZoneIds.size() );