Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude US/Pacific-New from randomized timezones #1139

Merged
merged 1 commit into from
Jan 31, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions driver/src/test/java/org/neo4j/driver/util/TemporalUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> BLACKLISTED_ZONE_IDS = Arrays.asList(
private static final List<String> 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"
);

Expand Down Expand Up @@ -128,7 +129,7 @@ private static ZoneId randomZoneId()
{
Set<String> 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() );
Expand Down