opentripplanner / OpenTripPlanner

An open source multi-modal trip planner
http://www.opentripplanner.org
Other
2.23k stars 1.04k forks source link

MoneyTest localisation fails #6269

Open miklcct opened 1 week ago

miklcct commented 1 week ago

Expected behavior

The test passes

Observed behavior

The test fails. The package can't be built.

[ERROR] Failures: 
[ERROR]   BikelyUpdaterTest.parseBikeBoxes:46 expected: <Første 12 time(r) er kr 0,00. Deretter kr 10,00 per 1 time(r)> but was: <Første 12 time(r) er 0,00 kr. Deretter 10,00 kr per 1 time(r)>
[ERROR]   MoneyTest.localize:46 expected: <USD 1,00> but was: <1,00 USD>
[ERROR]   MoneyTest.localize:46 expected: <kr 100,00> but was: <100,00 kr>

Version of OTP used (exact commit hash or JAR name)

0202d1efb1770a24c19c9bfd9f5cf86e5543fd27

The machine is Windows 11, Version 22H2 (Build 22621.4460), in English (United Kingdom) locale. Java version is

openjdk version "23.0.1" 2024-10-15
OpenJDK Runtime Environment (build 23.0.1+11-39)
OpenJDK 64-Bit Server VM (build 23.0.1+11-39, mixed mode, sharing)

P.S. The same test passes with the another JDK:

openjdk version "21.0.5" 2024-10-15 LTS
OpenJDK Runtime Environment Temurin-21.0.5+11 (build 21.0.5+11-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.5+11 (build 21.0.5+11-LTS, mixed mode, sharing)

Data sets in use (links to GTFS and OSM PBF files)

Not relevant

Command line used to start OTP

Not relevant

Router config and graph build config JSON

Not relevant

Steps to reproduce the problem

Build and package OpenTripPlanner

leonardehrenfried commented 4 days ago

This is probably because of the following bug in the JVM: https://bugs.openjdk.org/browse/JDK-8295564

They appeared to have changed the Norwegian formatting in Java 22.

In my view, it's not a very important test and I would be happy to simply disable the parts about Norwegian money formatting, rather than write a JVM-specific test.

leonardehrenfried commented 4 days ago

We did something similar here: https://github.com/opentripplanner/OpenTripPlanner/pull/5260

miklcct commented 4 days ago

Is it possible to make the test not dependent on JVM implementation details?

leonardehrenfried commented 4 days ago

You're certainly welcome to try, but I personally would not spend the time on it nor would I request someone else do it.