Skip to content

Commit

Permalink
Re-enable tests for GraalVM >= 24.2
Browse files Browse the repository at this point in the history
  • Loading branch information
zakkak committed Oct 7, 2024
1 parent 49a3a08 commit 2d8ba3e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public void testValidationMessageLocale(String acceptLanguage, String expectedMe
// This test works best in a non-english locale.
@Test
@DisableIfBuiltWithGraalVMNewerThan(value = GraalVMVersion.GRAALVM_24_1_999)
public void testDefaultLocaleBefore24_2() {
public void testDefaultLocalePre24_2() {
RestAssured.given().when()
.get("/default/de-CH")
.then()
Expand All @@ -147,7 +147,7 @@ public void testDefaultLocaleBefore24_2() {
// This test works best in a non-english locale.
@Test
@DisableIfBuiltWithGraalVMOlderThan(value = GraalVMVersion.GRAALVM_24_2_0)
public void testDefaultLocaleAfter24_1() {
public void testDefaultLocalePost24_1() {
RestAssured.given().when()
.get("/default/de-CH")
.then()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
quarkus.locales=all
quarkus.native.resources.includes=AppMessages_*.properties
quarkus.test.env.LC_ALL=mt_MT.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ public void testCorrectLocales(String country, String language, String translati
.log().all();
}

// Disable test with GraalVM 24.2 for JDK 24 and later till we reach a conclusion in
// https://github.com/quarkusio/quarkus/discussions/43533
@DisableIfBuiltWithGraalVMNewerThan(value = GraalVMVersion.GRAALVM_24_1_0)
@ParameterizedTest
@CsvSource(value = {
"en-US|en|US Dollar",
Expand All @@ -66,9 +63,6 @@ public void testCurrencies(String country, String language, String currency) {
.log().all();
}

// Disable test with GraalVM 24.2 for JDK 24 and later till we reach a conclusion in
// https://github.com/quarkusio/quarkus/discussions/43533
@DisableIfBuiltWithGraalVMNewerThan(value = GraalVMVersion.GRAALVM_24_1_0)
@ParameterizedTest
@CsvSource(value = {
"Asia/Tokyo|fr|heure normale du Japon",
Expand All @@ -90,13 +84,14 @@ public void testTimeZones(String zone, String language, String name) {
}

@Test
@DisableIfBuiltWithGraalVMNewerThan(value = GraalVMVersion.GRAALVM_24_1_0)
public void testDefaultLocaleBefore24_2() {
@DisableIfBuiltWithGraalVMNewerThan(value = GraalVMVersion.GRAALVM_24_1_999)
public void testDefaultLocalePre24_2() {
RestAssured.given().when()
.get("/default/de-CH")
.then()
.statusCode(HttpStatus.SC_OK)
/*
* Prior to GraalVM 24.2, the locale could not be changed at runtime.
* "Švýcarsko" is the correct name for Switzerland in Czech language.
* Czech is the default language as per quarkus.native.user-language=cs.
*/
Expand All @@ -106,12 +101,13 @@ public void testDefaultLocaleBefore24_2() {

@Test
@DisableIfBuiltWithGraalVMOlderThan(value = GraalVMVersion.GRAALVM_24_2_0)
public void testDefaultLocaleAfter24_1() {
public void testDefaultLocalePost24_1() {
RestAssured.given().when()
.get("/default/de-CH")
.then()
.statusCode(HttpStatus.SC_OK)
/*
* Starting with GraalVM 24.2, the locale can be set at runtime.
* "Schweiz" is the correct name for Switzerland in German.
* German is the default language as per the `quarkus.test.arg-line` in application.properties.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ quarkus.locales=de,fr-FR,ja,uk-UA
# used in your application properties. This test uses it only to verify compatibility.
quarkus.native.user-language=cs
quarkus.default-locale=en-US
quarkus.test.arg-line=-Duser.language=de
quarkus.test.arg-line=-Duser.language=de
quarkus.test.env.LC_ALL=mt_MT.UTF-8

0 comments on commit 2d8ba3e

Please sign in to comment.