From 419e58331716c7406b309f1468de1e3df8941111 Mon Sep 17 00:00:00 2001 From: linghengqian Date: Thu, 13 Jun 2024 23:14:58 +0800 Subject: [PATCH] Fixes the issue that nativeTest cannot be executed using Junit 5.11.0-M2 --- .github/workflows/test-native-gradle-plugin.yml | 2 +- .sdkmanrc | 2 +- .../platform/config/platform/PlatformConfigProvider.java | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-native-gradle-plugin.yml b/.github/workflows/test-native-gradle-plugin.yml index e1b259bb1..76fea37b5 100644 --- a/.github/workflows/test-native-gradle-plugin.yml +++ b/.github/workflows/test-native-gradle-plugin.yml @@ -94,7 +94,7 @@ jobs: github-token: ${{ inputs.github-token }} set-java-home: 'false' - name: "❓ Check and test the plugin" - run: ./gradlew :native-gradle-plugin:functionalTest + run: ./gradlew :native-gradle-plugin:functionalTest --no-configuration-cache - name: "📜 Upload functional tests results" if: always() uses: actions/upload-artifact@v3 diff --git a/.sdkmanrc b/.sdkmanrc index f4ecfdbe4..77aee5170 100644 --- a/.sdkmanrc +++ b/.sdkmanrc @@ -1,3 +1,3 @@ # Enable auto-env through the sdkman_auto_env config # Add key=value pairs of SDKs to use below -java=22.2.r11-grl +java=17.0.11-graal diff --git a/common/junit-platform-native/src/main/java/org/graalvm/junit/platform/config/platform/PlatformConfigProvider.java b/common/junit-platform-native/src/main/java/org/graalvm/junit/platform/config/platform/PlatformConfigProvider.java index d9c03eb16..4b94023b1 100644 --- a/common/junit-platform-native/src/main/java/org/graalvm/junit/platform/config/platform/PlatformConfigProvider.java +++ b/common/junit-platform-native/src/main/java/org/graalvm/junit/platform/config/platform/PlatformConfigProvider.java @@ -60,7 +60,9 @@ public void onLoad(NativeImageConfiguration config) { "org.junit.platform.engine.UniqueIdFormat", "org.junit.platform.commons.util.ReflectionUtils", // https://github.com/graalvm/native-build-tools/issues/300 - "org.junit.platform.reporting.open.xml.OpenTestReportGeneratingListener" + "org.junit.platform.reporting.open.xml.OpenTestReportGeneratingListener", + // https://github.com/graalvm/native-build-tools/issues/602 + "org.junit.platform.commons.util.LruCache" ); if (getMajorJDKVersion() >= 21) {