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

Use the root locale during the validation tests #814

Merged

Conversation

MaisiKoleni
Copy link
Contributor

@MaisiKoleni MaisiKoleni commented Sep 5, 2022

The problem messages that get checked in the validation tests are locale-sensitive and therefore, the tests fail on some computers with non-English default locale, e.g., German or French. Setting and restoring the root locale should fix the problem without interfering with other tests / steps in the build process.

Note that I chose to add this directly into the test class such that it works in the IDE without running Maven, too.

Some alternatives would be to extract the logic into a super class or JUnit 5 test extension, but this is the only test in this repository with the problem.

Example errors:

// German locale
org.opentest4j.AssertionFailedError: expected: <server.port must be greater than or equal to 8000> but was: <server.port muss größer-gleich 8000 sein>
// French locale
org.opentest4j.AssertionFailedError: expected: <server.port must be greater than or equal to 8000> but was: <server.port doit être supérieur ou égal à 8000>

The problem messages that get checked in the validation tests are locale-sensitive and therefore, the tests fail on some computers with non-English default locale, e.g., German or French. Setting and restoring the root locale should fix the problem without interfering with other tests / steps in the build process.
@radcortez
Copy link
Member

Thank you :)

@radcortez radcortez merged commit 9555ab3 into smallrye:main Sep 6, 2022
@radcortez radcortez added this to the 2.12.1 milestone Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants