Skip to content

Commit 2aac13d

Browse files
injectivesmichael-simonsfbiville
authored
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 <[email protected]> Co-authored-by: Michael Simons <[email protected]> Co-authored-by: Florent Biville <[email protected]>
1 parent 7bf80a7 commit 2aac13d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

driver/src/test/java/org/neo4j/driver/util/TemporalUtil.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,14 @@ public final class TemporalUtil
5454
* For example "Canada/East-Saskatchewan" will be returned as "Canada/Saskatchewan".
5555
* Other time zones are not working correctly in some Java versions
5656
*/
57-
private static final List<String> BLACKLISTED_ZONE_IDS = Arrays.asList(
57+
private static final List<String> EXCLUDED_ZONE_IDS = Arrays.asList(
5858
"Canada/East-Saskatchewan",
5959
"Chile/EasterIsland",
6060
"Africa/Casablanca",
6161
"tzid",
6262
"Asia/Qostanay",
6363
"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.
64+
"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`"
6465
"Pacific/Easter"
6566
);
6667

@@ -128,7 +129,7 @@ private static ZoneId randomZoneId()
128129
{
129130
Set<String> availableZoneIds = ZoneId.getAvailableZoneIds()
130131
.stream()
131-
.filter( id -> !BLACKLISTED_ZONE_IDS.contains( id ) )
132+
.filter( id -> !EXCLUDED_ZONE_IDS.contains( id ) )
132133
.collect( toSet() );
133134

134135
int randomIndex = random().nextInt( availableZoneIds.size() );

0 commit comments

Comments
 (0)