diff --git a/.github/workflows/builder_image_tests.yml b/.github/workflows/builder_image_tests.yml index 4536aa64..fc949377 100644 --- a/.github/workflows/builder_image_tests.yml +++ b/.github/workflows/builder_image_tests.yml @@ -35,12 +35,16 @@ jobs: mandrel-builder-image: '22.3-java17' - quarkus-version: '2.16.12.Final' mandrel-builder-image: '22.3-java17' - - quarkus-version: '3.2.9.Final' + - quarkus-version: '3.2.11.Final' mandrel-builder-image: 'jdk-17' - quarkus-version: '3.5.3' mandrel-builder-image: 'jdk-21' - quarkus-version: '3.6.0' mandrel-builder-image: 'jdk-21' + - quarkus-version: '3.8.3' + mandrel-builder-image: 'jdk-21' + - quarkus-version: '3.9.0.CR2' + mandrel-builder-image: 'jdk-21' steps: - uses: actions/checkout@v3 with: diff --git a/.github/workflows/local_tests.yml b/.github/workflows/local_tests.yml index e72d7acf..375ccd7f 100644 --- a/.github/workflows/local_tests.yml +++ b/.github/workflows/local_tests.yml @@ -70,12 +70,12 @@ jobs: os: 'ubuntu-20.04' timeout-minutes: 80 - - quarkus-version: '3.2.9.Final' + - quarkus-version: '3.2.11.Final' mandrel-version: '23.0.2.1-Final' java-version: '17' os: 'windows-2022' timeout-minutes: 80 - - quarkus-version: '3.2.9.Final' + - quarkus-version: '3.2.11.Final' mandrel-version: '23.0.2.1-Final' java-version: '17' os: 'ubuntu-20.04' @@ -102,6 +102,28 @@ jobs: java-version: '21' os: 'ubuntu-20.04' timeout-minutes: 130 + + - quarkus-version: '3.8.3' + mandrel-version: '23.1.2.0-Final' + java-version: '21' + os: 'windows-2022' + timeout-minutes: 80 + - quarkus-version: '3.8.3' + mandrel-version: '23.1.2.0-Final' + java-version: '21' + os: 'ubuntu-20.04' + timeout-minutes: 130 + + - quarkus-version: '3.9.0.CR2' + mandrel-version: '23.1.2.0-Final' + java-version: '21' + os: 'windows-2022' + timeout-minutes: 80 + - quarkus-version: '3.9.0.CR2' + mandrel-version: '23.1.2.0-Final' + java-version: '21' + os: 'ubuntu-20.04' + timeout-minutes: 130 steps: - uses: actions/checkout@v3 with: diff --git a/apps/jfr-native-image-performance/quarkus_3.9.x.patch b/apps/jfr-native-image-performance/quarkus_3.9.x.patch new file mode 100644 index 00000000..2d63c8a1 --- /dev/null +++ b/apps/jfr-native-image-performance/quarkus_3.9.x.patch @@ -0,0 +1,13 @@ +diff --git a/apps/jfr-native-image-performance/pom.xml b/apps/jfr-native-image-performance/pom.xml +index 771b835..60df02b 100644 +--- a/apps/jfr-native-image-performance/pom.xml ++++ b/apps/jfr-native-image-performance/pom.xml +@@ -33,7 +33,7 @@ + + + io.quarkus +- quarkus-resteasy-reactive ++ quarkus-rest + + + io.quarkus diff --git a/apps/quarkus-json/quarkus_3.9.x.patch b/apps/quarkus-json/quarkus_3.9.x.patch new file mode 100644 index 00000000..07c62052 --- /dev/null +++ b/apps/quarkus-json/quarkus_3.9.x.patch @@ -0,0 +1,42 @@ +diff --git a/apps/quarkus-json/pom.xml b/apps/quarkus-json/pom.xml +index 3d5fa5f..b1474e3 100644 +--- a/apps/quarkus-json/pom.xml ++++ b/apps/quarkus-json/pom.xml +@@ -32,11 +32,11 @@ + + + io.quarkus +- quarkus-resteasy-reactive-jackson ++ quarkus-rest-jackson + + + io.quarkus +- quarkus-resteasy-reactive ++ quarkus-rest + + + io.quarkus +diff --git a/apps/quarkus-json/src/main/java/org/acme/ExampleResource.java b/apps/quarkus-json/src/main/java/org/acme/ExampleResource.java +index dfb224d..a37b4a3 100644 +--- a/apps/quarkus-json/src/main/java/org/acme/ExampleResource.java ++++ b/apps/quarkus-json/src/main/java/org/acme/ExampleResource.java +@@ -1,12 +1,12 @@ + package org.acme; + +-import javax.ws.rs.Consumes; +-import javax.ws.rs.GET; +-import javax.ws.rs.POST; +-import javax.ws.rs.Path; +-import javax.ws.rs.Produces; +-import javax.ws.rs.core.MediaType; +-import javax.ws.rs.core.Response; ++import jakarta.ws.rs.Consumes; ++import jakarta.ws.rs.GET; ++import jakarta.ws.rs.POST; ++import jakarta.ws.rs.Path; ++import jakarta.ws.rs.Produces; ++import jakarta.ws.rs.core.MediaType; ++import jakarta.ws.rs.core.Response; + import java.io.ByteArrayOutputStream; + import java.math.BigInteger; + import java.security.MessageDigest; diff --git a/testsuite/src/it/java/org/graalvm/tests/integration/JFRTest.java b/testsuite/src/it/java/org/graalvm/tests/integration/JFRTest.java index d58c052f..1b1fc7b7 100644 --- a/testsuite/src/it/java/org/graalvm/tests/integration/JFRTest.java +++ b/testsuite/src/it/java/org/graalvm/tests/integration/JFRTest.java @@ -27,6 +27,8 @@ import org.graalvm.tests.integration.utils.Logs; import org.graalvm.tests.integration.utils.WebpageTester; import org.graalvm.tests.integration.utils.versions.IfMandrelVersion; +import org.graalvm.tests.integration.utils.versions.IfQuarkusVersion; +import org.graalvm.tests.integration.utils.versions.QuarkusVersion; import org.graalvm.tests.integration.utils.versions.UsedVersion; import org.jboss.logging.Logger; import org.json.JSONObject; @@ -64,6 +66,7 @@ import static org.graalvm.tests.integration.utils.Commands.BUILDER_IMAGE; import static org.graalvm.tests.integration.utils.Commands.CONTAINER_RUNTIME; import static org.graalvm.tests.integration.utils.Commands.IS_THIS_WINDOWS; +import static org.graalvm.tests.integration.utils.Commands.QUARKUS_VERSION; import static org.graalvm.tests.integration.utils.Commands.builderRoutine; import static org.graalvm.tests.integration.utils.Commands.cleanTarget; import static org.graalvm.tests.integration.utils.Commands.cleanup; @@ -164,6 +167,7 @@ public void jfrSmokeTest(TestInfo testInfo) throws IOException, InterruptedExcep @Tag("jfr") @Tag("builder-image") @IfMandrelVersion(min = "23.0.0", inContainer = true) // Thread park event is introduced in 23.0 + @IfQuarkusVersion(min = "3.0") public void jfrPerfContainerTest(TestInfo testInfo) throws IOException, InterruptedException { jfrPerfTestRun(testInfo, true); } @@ -172,6 +176,7 @@ public void jfrPerfContainerTest(TestInfo testInfo) throws IOException, Interrup @Tag("jfr-perf") @Tag("jfr") @IfMandrelVersion(min = "23.0.0") // Thread park event is introduced in 23.0 + @IfQuarkusVersion(min = "3.0") public void jfrPerfTest(TestInfo testInfo) throws IOException, InterruptedException { jfrPerfTestRun(testInfo, false); } @@ -187,6 +192,7 @@ public void jfrPerfTestRun(TestInfo testInfo, boolean inContainer) throws IOExce final String mn = testInfo.getTestMethod().get().getName(); final Path measurementsLog = Paths.get(Logs.getLogsDir(cn, mn).toString(), "measurements.csv"); final Path jfrPerfJfc = Paths.get(appDir.getAbsolutePath(), "jfr-perf.jfc"); + String patch = null; try { // Cleanup @@ -202,11 +208,16 @@ public void jfrPerfTestRun(TestInfo testInfo, boolean inContainer) throws IOExce generateJFRConfigurationFile(inContainer, jfrPerfJfc, processLog); - Map switches = null; if (UsedVersion.getVersion(inContainer).compareTo(Version.create(23, 1, 0)) >= 0) { switches = Map.of("-H:+SignalHandlerBasedExecutionSampler", "-H:+UnlockExperimentalVMOptions,-H:+SignalHandlerBasedExecutionSampler,-H:-UnlockExperimentalVMOptions"); } + + if (QUARKUS_VERSION.compareTo(QuarkusVersion.V_3_9_0) >= 0) { + patch = "quarkus_3.9.x.patch"; + runCommand(getRunCommand("git", "apply", patch), appDir); + } + // Container build requires an additional step: docker build... builderRoutine(inContainer ? 2 : 1, appJfr, report, cn, mn, appDir, processLog, null, switches); builderRoutine(inContainer ? 2 : 1, appNoJfr, report, cn, mn, appDir, processLog, null, switches); @@ -235,6 +246,9 @@ public void jfrPerfTestRun(TestInfo testInfo, boolean inContainer) throws IOExce removeContainers(ContainerNames.JFR_PERFORMANCE_BUILDER_IMAGE.name, ContainerNames.JFR_PLAINTEXT_BUILDER_IMAGE.name); } enableTurbo(); + if (patch != null) { + runCommand(getRunCommand("git", "apply", "-R", patch), appDir); + } } } diff --git a/testsuite/src/it/java/org/graalvm/tests/integration/PerfCheckTest.java b/testsuite/src/it/java/org/graalvm/tests/integration/PerfCheckTest.java index 4a0b09d5..9d31757f 100644 --- a/testsuite/src/it/java/org/graalvm/tests/integration/PerfCheckTest.java +++ b/testsuite/src/it/java/org/graalvm/tests/integration/PerfCheckTest.java @@ -31,7 +31,6 @@ import org.graalvm.tests.integration.utils.versions.UsedVersion; import org.jboss.logging.Logger; import org.jboss.resteasy.spi.HttpResponseCodes; -import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestInfo; @@ -133,14 +132,22 @@ public void testQuarkusJSONParseOnce(TestInfo testInfo) throws IOException, Inte final List> reports = new ArrayList<>(3); // Test data tmp storage final File json = Path.of(appDir.getAbsolutePath(), "logs", "record.json").toFile(); + String patch = null; + try { // Cleanup cleanTarget(app); Files.createDirectories(Paths.get(appDir.getAbsolutePath(), "logs")); assertTrue(app.buildAndRunCmds.cmds.length > 1); - if (QUARKUS_VERSION.compareTo(QuarkusVersion.V_3_0_0) >= 0) { - runCommand(getRunCommand("git", "apply", "quarkus_3.x.patch"), appDir); + if (QUARKUS_VERSION.compareTo(QuarkusVersion.V_3_9_0) >= 0) { + patch = "quarkus_3.9.x.patch"; + } else if (QUARKUS_VERSION.compareTo(QuarkusVersion.V_3_0_0) >= 0) { + patch = "quarkus_3.x.patch"; + } + + if (patch != null) { + runCommand(getRunCommand("git", "apply", patch), appDir); } // Build executables @@ -158,10 +165,10 @@ public void testQuarkusJSONParseOnce(TestInfo testInfo) throws IOException, Inte report.put("timeToFirstOKRequestMs", String.valueOf(timeToFirstOKRequestMs)); // Test web pages try (final ReadableByteChannel readableByteChannel = Channels.newChannel(new URL(app.urlContent.urlContent[1][0]).openStream()); - final FileOutputStream fileOutputStream = new FileOutputStream(json)) { + final FileOutputStream fileOutputStream = new FileOutputStream(json)) { fileOutputStream.getChannel().transferFrom(readableByteChannel, 0, Long.MAX_VALUE); } - final String[] headers = new String[]{ + final String[] headers = new String[] { "Content-Type", "application/json", "Accept", "text/plain" }; @@ -196,7 +203,7 @@ public void testQuarkusJSONParseOnce(TestInfo testInfo) throws IOException, Inte report.put("branches", String.valueOf(pr.branches)); report.put("branchMisses", String.valueOf(pr.branchMisses)); report.put("secondsTimeElapsed", String.valueOf(pr.secondsTimeElapsed)); - Assertions.assertTrue(waitForTcpClosed("localhost", parsePort(app.urlContent.urlContent[0][0]), 60), + assertTrue(waitForTcpClosed("localhost", parsePort(app.urlContent.urlContent[0][0]), 60), "Main port is still open"); final Commands.SerialGCLog l; if (!statsFor.contains("-jar")) { @@ -231,7 +238,7 @@ public void testQuarkusJSONParseOnce(TestInfo testInfo) throws IOException, Inte } } LOGGER.info("Gonna wait for ports closed..."); - Assertions.assertTrue(waitForTcpClosed("localhost", parsePort(app.urlContent.urlContent[0][0]), 60), + assertTrue(waitForTcpClosed("localhost", parsePort(app.urlContent.urlContent[0][0]), 60), "Main port is still open"); Logs.checkLog(cn, mn, app, processLog); } finally { @@ -245,8 +252,8 @@ public void testQuarkusJSONParseOnce(TestInfo testInfo) throws IOException, Inte "quarkus-json_+ParseOnce-native-image-source-jar", "quarkus-json_plus-ParseOnce.json").toFile()); Logs.archiveLog(cn, mn, processLog); cleanTarget(app); - if (QUARKUS_VERSION.compareTo(QuarkusVersion.V_3_0_0) >= 0) { - runCommand(getRunCommand("git", "apply", "-R", "quarkus_3.x.patch"), appDir); + if (patch != null) { + runCommand(getRunCommand("git", "apply", "-R", patch), appDir); } } } @@ -264,14 +271,22 @@ public void testQuarkusJSON(TestInfo testInfo) throws IOException, InterruptedEx final List> reports = new ArrayList<>(2); // Test data tmp storage final File json = Path.of(appDir.getAbsolutePath(), "logs", "record.json").toFile(); + String patch = null; + try { // Cleanup cleanTarget(app); Files.createDirectories(Paths.get(appDir.getAbsolutePath(), "logs")); assertTrue(app.buildAndRunCmds.cmds.length > 1); - if (QUARKUS_VERSION.compareTo(QuarkusVersion.V_3_0_0) >= 0) { - runCommand(getRunCommand("git", "apply", "quarkus_3.x.patch"), appDir); + if (QUARKUS_VERSION.compareTo(QuarkusVersion.V_3_9_0) >= 0) { + patch = "quarkus_3.9.x.patch"; + } else if (QUARKUS_VERSION.compareTo(QuarkusVersion.V_3_0_0) >= 0) { + patch = "quarkus_3.x.patch"; + } + + if (patch != null) { + runCommand(getRunCommand("git", "apply", patch), appDir); } // Build executables @@ -326,7 +341,7 @@ public void testQuarkusJSON(TestInfo testInfo) throws IOException, InterruptedEx report.put("branches", String.valueOf(pr.branches)); report.put("branchMisses", String.valueOf(pr.branchMisses)); report.put("secondsTimeElapsed", String.valueOf(pr.secondsTimeElapsed)); - Assertions.assertTrue(waitForTcpClosed("localhost", parsePort(app.urlContent.urlContent[0][0]), 60), + assertTrue(waitForTcpClosed("localhost", parsePort(app.urlContent.urlContent[0][0]), 60), "Main port is still open"); final Commands.SerialGCLog l; if (!statsFor.contains("-jar")) { @@ -360,7 +375,7 @@ public void testQuarkusJSON(TestInfo testInfo) throws IOException, InterruptedEx } } LOGGER.info("Gonna wait for ports closed..."); - Assertions.assertTrue(waitForTcpClosed("localhost", parsePort(app.urlContent.urlContent[0][0]), 60), + assertTrue(waitForTcpClosed("localhost", parsePort(app.urlContent.urlContent[0][0]), 60), "Main port is still open"); Logs.checkLog(cn, mn, app, processLog); } finally { @@ -372,8 +387,8 @@ public void testQuarkusJSON(TestInfo testInfo) throws IOException, InterruptedEx "quarkus-json-native-image-source-jar", "quarkus-json.json").toFile()); Logs.archiveLog(cn, mn, processLog); cleanTarget(app); - if (QUARKUS_VERSION.compareTo(QuarkusVersion.V_3_0_0) >= 0) { - runCommand(getRunCommand("git", "apply", "-R", "quarkus_3.x.patch"), appDir); + if (patch != null) { + runCommand(getRunCommand("git", "apply", "-R", patch), appDir); } } } @@ -453,7 +468,7 @@ public void testQuarkusFullMicroProfile(TestInfo testInfo) throws IOException, I report.put("branches", String.valueOf(pr.branches)); report.put("branchMisses", String.valueOf(pr.branchMisses)); report.put("secondsTimeElapsed", String.valueOf(pr.secondsTimeElapsed)); - Assertions.assertTrue(waitForTcpClosed("localhost", parsePort(app.urlContent.urlContent[0][0]), 60), + assertTrue(waitForTcpClosed("localhost", parsePort(app.urlContent.urlContent[0][0]), 60), "Main port is still open"); final Commands.SerialGCLog l; if (!statsFor.contains("-jar")) { @@ -486,7 +501,7 @@ public void testQuarkusFullMicroProfile(TestInfo testInfo) throws IOException, I } } LOGGER.info("Gonna wait for ports closed..."); - Assertions.assertTrue(waitForTcpClosed("localhost", parsePort(app.urlContent.urlContent[0][0]), 60), + assertTrue(waitForTcpClosed("localhost", parsePort(app.urlContent.urlContent[0][0]), 60), "Main port is still open"); Logs.checkLog(cn, mn, app, processLog); } finally { diff --git a/testsuite/src/it/java/org/graalvm/tests/integration/utils/Commands.java b/testsuite/src/it/java/org/graalvm/tests/integration/utils/Commands.java index 75716024..cb6c4f92 100644 --- a/testsuite/src/it/java/org/graalvm/tests/integration/utils/Commands.java +++ b/testsuite/src/it/java/org/graalvm/tests/integration/utils/Commands.java @@ -1165,15 +1165,18 @@ public static void replaceInSmallTextFile(Pattern search, String replace, Path f /** * Finds the first matching executable in a given dir, - * *does not dive into the tree*, is not recursive... + * does not dive into the tree, is not recursive... * * @param dir * @param regexp * @return null or the found file */ public static File findExecutable(Path dir, Pattern regexp) { - if (dir == null || Files.notExists(dir) || regexp == null) { - throw new IllegalArgumentException("Path to " + dir + "must exist and regexp must nut be null."); + if (regexp == null) { + throw new IllegalArgumentException("Regexp must not be null."); + } + if (dir == null || Files.notExists(dir)) { + throw new IllegalArgumentException("Path to " + dir + " must exist."); } final File[] f = dir.toFile().listFiles(pathname -> { if (pathname.isFile() && Files.isExecutable(pathname.toPath())) { diff --git a/testsuite/src/it/java/org/graalvm/tests/integration/utils/versions/QuarkusVersion.java b/testsuite/src/it/java/org/graalvm/tests/integration/utils/versions/QuarkusVersion.java index f6b2408f..40aff903 100644 --- a/testsuite/src/it/java/org/graalvm/tests/integration/utils/versions/QuarkusVersion.java +++ b/testsuite/src/it/java/org/graalvm/tests/integration/utils/versions/QuarkusVersion.java @@ -30,6 +30,8 @@ public class QuarkusVersion implements Comparable { public static final QuarkusVersion V_3_0_0 = new QuarkusVersion("3.0.0"); public static final QuarkusVersion V_3_6_0 = new QuarkusVersion("3.6.0"); public static final QuarkusVersion V_3_7_0 = new QuarkusVersion("3.7.0"); + public static final QuarkusVersion V_3_9_0 = new QuarkusVersion("3.9.0"); + private final String version; private final int major; private final int minor;