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

Update dependencies #381

Merged
merged 3 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 23 additions & 16 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,28 @@
<packaging>pom</packaging>
<name>Quarkus StartStop TS: Parent</name>
<properties>
<quarkus.version>3.11.0</quarkus.version>
<quarkus.version>3.13.0</quarkus.version>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
<quarkus-ide-config.version>3.11.0</quarkus-ide-config.version>
<quarkus-ide-config.version>3.13.0</quarkus-ide-config.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.release>17</maven.compiler.release>
<maven.compiler.version>3.10.1</maven.compiler.version>
<maven.surefire.version>2.22.2</maven.surefire.version>
<maven.failsafe.version>2.22.2</maven.failsafe.version>
<maven.build.helper.version>3.3.0</maven.build.helper.version>
<maven.compiler.version>3.13.0</maven.compiler.version>
<maven.surefire.version>3.3.1</maven.surefire.version>
<maven.failsafe.version>3.3.1</maven.failsafe.version>
<maven.build.helper.version>3.6.0</maven.build.helper.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<junit.jupiter.version>5.9.2</junit.jupiter.version>
<commons.io.version>2.11.0</commons.io.version>
<commons.lang.version>3.12.0</commons.lang.version>
<jboss-logging.version>3.5.0.Final</jboss-logging.version>
<log4j.version>2.19.0</log4j.version>
<playwright.version>1.30.0</playwright.version>
<vertx-grpc-server.version>4.5.7</vertx-grpc-server.version>
<formatter-maven-plugin.version>2.22.0</formatter-maven-plugin.version>
<impsort-maven-plugin.version>1.8.0</impsort-maven-plugin.version>
<xml-format-maven-plugin>3.2.2</xml-format-maven-plugin>
<junit.jupiter.version>5.10.3</junit.jupiter.version>
<commons.io.version>2.16.1</commons.io.version>
<commons.lang.version>3.15.0</commons.lang.version>
<jboss-logging.version>3.6.0.Final</jboss-logging.version>
<log4j.version>2.23.1</log4j.version>
<playwright.version>1.45.0</playwright.version>
<vertx-grpc-server.version>4.5.9</vertx-grpc-server.version>
<formatter-maven-plugin.version>2.24.1</formatter-maven-plugin.version>
<impsort-maven-plugin.version>1.9.0</impsort-maven-plugin.version>
<xml-format-maven-plugin>3.3.1</xml-format-maven-plugin>
<opentelemetry-proto.version>1.3.2-alpha</opentelemetry-proto.version>
<!-- Test to be executed by default (should be all of them) -->
<includeTags>generator,startstop,bomtests,codequarkus,special-chars</includeTags>
<!-- Default values for format -->
Expand Down Expand Up @@ -60,6 +61,12 @@
<version>${playwright.version}</version>
<scope>test</scope>
</dependency>
<dependency>
rsvoboda marked this conversation as resolved.
Show resolved Hide resolved
<groupId>io.opentelemetry.proto</groupId>
<artifactId>opentelemetry-proto</artifactId>
<version>${opentelemetry-proto.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<profiles>
<profile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public void testRuntime(TestInfo testInfo, String[] extensions, Set<TestFlags> f
Files.createDirectories(Paths.get(repoDir));

//Generator
LOGGER.info("Running inside " + appDir.getAbsolutePath());
LOGGER.info(mn + ": Generator command " + String.join(" ", generatorCmd));
generateLog = new File(logsDir + File.separator + "bom-artifact-generator.log");
ExecutorService buildService = Executors.newFixedThreadPool(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ public void testRuntime(TestInfo testInfo, String[] extensions, Set<TestFlags> f
} else {
LOGGER.info(mn + ": Testing setup: " + String.join(" ", generatorCmd));
}

LOGGER.info("Running inside " + appDir.getAbsolutePath());
try {
// Cleanup
cleanDirOrFile(appBaseDir.getAbsolutePath());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ public void testRuntime(TestInfo testInfo, Apps app, MvnCmds mvnCmds, String sub
File appDir = new File(appDestDir, app.dir);
File appPomXml = new File(appDir, "pom.xml");
File logsDir = new File(appDir, "special-chars-logs");
String cn = testInfo.getTestClass().get().getCanonicalName();
String mn = testInfo.getTestMethod().get().getName();
String canonicalName = testInfo.getTestClass().get().getCanonicalName();
String methodName = testInfo.getTestMethod().get().getName();
LOGGER.info("Testing app: " + app + ", mode: " + mvnCmds.toString() + ", on path " + appDestDir);
try {
// Clean target directory
Expand All @@ -75,6 +75,7 @@ public void testRuntime(TestInfo testInfo, Apps app, MvnCmds mvnCmds, String sub
}

// Copy to path with special characters
LOGGER.info("Copying " + appBaseDir + "to" + appDestDir);
FileUtils.copyDirectoryToDirectory(appBaseDir, appDestDir);

// Replace relative path to parent project
Expand All @@ -99,7 +100,7 @@ public void testRuntime(TestInfo testInfo, Apps app, MvnCmds mvnCmds, String sub
baseBuildCmd.add("-Dquarkus.platform.group-id=" + getQuarkusGroupId());
cmd = getBuildCommand(baseBuildCmd.toArray(new String[0]));

appendln(whatIDidReport, "# " + cn + ", " + mn);
appendln(whatIDidReport, "# " + canonicalName + ", " + methodName);
appendln(whatIDidReport, (new Date()).toString());
appendln(whatIDidReport, appDir.getAbsolutePath());
appendlnSection(whatIDidReport, String.join(" ", cmd));
Expand All @@ -111,11 +112,11 @@ public void testRuntime(TestInfo testInfo, Apps app, MvnCmds mvnCmds, String sub
buildService.awaitTermination(30, TimeUnit.MINUTES);

assertTrue(buildLogA.exists());
checkLog(cn, mn, app, mvnCmds, buildLogA);
checkLog(canonicalName, methodName, app, mvnCmds, buildLogA);
}

// Run
runLogA = new File(logsDir + File.separator + subdir + "-" + mvnCmds.name().toLowerCase() + "-run.log");
runLogA = new File(logsDir + File.separator + subdir + "-" + mvnCmds.name().toLowerCase() + "-run.log");

if (mvnCmds == MvnCmds.DEV) {
List<String> baseBuildCmd = new ArrayList<>();
Expand Down Expand Up @@ -148,12 +149,12 @@ public void testRuntime(TestInfo testInfo, Apps app, MvnCmds mvnCmds, String sub

// Archive logs
if (buildLogA != null) {
archiveLog(cn, mn, buildLogA);
archiveLog(canonicalName, methodName, buildLogA);
}
if (runLogA != null) {
archiveLog(cn, mn, runLogA);
archiveLog(canonicalName, methodName, runLogA);
}
writeReport(cn, mn, whatIDidReport.toString());
writeReport(canonicalName, methodName, whatIDidReport.toString());

removeDirWithSpecialCharacters(appDestDir);
}
Expand All @@ -176,6 +177,7 @@ public void spacesNative(TestInfo testInfo) throws IOException, InterruptedExcep
}

@Test
@Disabled("TODO: https://github.com/quarkusio/quarkus/issues/42248")
public void specialJVM(TestInfo testInfo) throws IOException, InterruptedException {
testRuntime(testInfo, Apps.JAKARTA_REST_MINIMAL, MvnCmds.JVM, ",;~!@#$%^&()");
}
Expand All @@ -189,6 +191,7 @@ public void specialDEV(TestInfo testInfo) throws IOException, InterruptedExcepti
@Test
@Tag("native")
@DisabledOnOs({OS.WINDOWS}) // https://github.com/quarkusio/quarkus/issues/9707
@Disabled("TODO: https://github.com/quarkusio/quarkus/issues/42248")
public void specialNative(TestInfo testInfo) throws IOException, InterruptedException {
testRuntime(testInfo, Apps.JAKARTA_REST_MINIMAL, MvnCmds.NATIVE, ",;~!@#$%^&()");
}
Expand Down
31 changes: 16 additions & 15 deletions testsuite/src/it/java/io/quarkus/ts/startstop/StartStopTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ public void testRuntime(TestInfo testInfo, Apps app, MvnCmds mvnCmds, Supplier<U
StringBuilder whatIDidReport = new StringBuilder();
File appDir = new File(BASE_DIR + File.separator + app.dir);
Optional<AsyncProfiler> asyncProfiler = mvnCmds == MvnCmds.JVM ? AsyncProfiler.create() : Optional.empty();
String cn = testInfo.getTestClass().get().getCanonicalName();
String mn = testInfo.getTestMethod().get().getName();
try(var testResource = testResourceSupplier.get()) {
String canonicalName = testInfo.getTestClass().get().getCanonicalName();
String methodName = testInfo.getTestMethod().get().getName();
try (var testResource = testResourceSupplier.get()) {
// Cleanup
asyncProfiler.ifPresent(ignore -> AsyncProfiler.cleanProfilingResults(app));
cleanTarget(app);
Expand All @@ -99,9 +99,10 @@ public void testRuntime(TestInfo testInfo, Apps app, MvnCmds mvnCmds, Supplier<U
baseBuildCmd.add("-Dquarkus.version=" + getQuarkusVersion());
baseBuildCmd.add("-Dquarkus.platform.group-id=" + getQuarkusGroupId());
final List<String> buildCommand = getBuildCommand(baseBuildCmd.toArray(new String[0]));
LOGGER.info("Running " + baseBuildCmd + " in the " + appDir.getAbsolutePath());

buildService.submit(new Commands.ProcessRunner(appDir, buildLogA, buildCommand, 20));
appendln(whatIDidReport, "# " + cn + ", " + mn);
appendln(whatIDidReport, "# " + canonicalName + ", " + methodName);
appendln(whatIDidReport, (new Date()).toString());
appendln(whatIDidReport, appDir.getAbsolutePath());
appendlnSection(whatIDidReport, String.join(" ", buildCommand));
Expand All @@ -111,7 +112,7 @@ public void testRuntime(TestInfo testInfo, Apps app, MvnCmds mvnCmds, Supplier<U
long buildEnds = System.currentTimeMillis();

assertTrue(buildLogA.exists());
checkLog(cn, mn, app, mvnCmds, buildLogA);
checkLog(canonicalName, methodName, app, mvnCmds, buildLogA);

if (mvnCmds == MvnCmds.NATIVE) {
String nativeBinaryLocation = mvnCmds.mvnCmds[1][0];
Expand Down Expand Up @@ -147,7 +148,7 @@ public void testRuntime(TestInfo testInfo, Apps app, MvnCmds mvnCmds, Supplier<U

final Process currentProcess = pA;
final int runId = i;
asyncProfiler.ifPresent(control -> control.stopProfing(appDir, mvnCmds, currentProcess, runId));
asyncProfiler.ifPresent(control -> control.stopProfing(appDir, mvnCmds, currentProcess, runId));

LOGGER.info("Testing web page content...");
for (String[] urlContent : app.urlContent.urlContent) {
Expand All @@ -166,12 +167,12 @@ public void testRuntime(TestInfo testInfo, Apps app, MvnCmds mvnCmds, Supplier<U
// Release ports
assertTrue(waitForTcpClosed("localhost", parsePort(app.urlContent.urlContent[0][0]), 60),
"Main port is still open");
checkLog(cn, mn, app, mvnCmds, runLogA);
checkListeningHost(cn, mn, mvnCmds, runLogA);
checkLog(canonicalName, methodName, app, mvnCmds, runLogA);
checkListeningHost(canonicalName, methodName, mvnCmds, runLogA);

float[] startedStopped = parseStartStopTimestamps(runLogA);

Path measurementsLog = Paths.get(getLogsDir(cn, mn).toString(), "measurements.csv");
Path measurementsLog = Paths.get(getLogsDir(canonicalName, methodName).toString(), "measurements.csv");
LogBuilder.Log log = new LogBuilder()
.app(app)
.mode(mvnCmds)
Expand All @@ -191,7 +192,7 @@ public void testRuntime(TestInfo testInfo, Apps app, MvnCmds mvnCmds, Supplier<U

testResource.reset();
}

LOGGER.info("Calculating the stats");
long rssKbAvgWithoutMinMax = getAvgWithoutMinMax(rssKbList);
long timeToFirstOKRequestAvgWithoutMinMax = getAvgWithoutMinMax(timeToFirstOKRequestList);
LOGGER.info("AVG timeToFirstOKRequest without min and max values: " + timeToFirstOKRequestAvgWithoutMinMax);
Expand All @@ -202,11 +203,11 @@ public void testRuntime(TestInfo testInfo, Apps app, MvnCmds mvnCmds, Supplier<U
if (pA != null) {
processStopper(pA, true);
}
asyncProfiler.ifPresent(profiler -> profiler.archiveProfilingResults(cn, mn, appDir));
archiveLog(cn, mn, buildLogA);
archiveLog(cn, mn, runLogA);
writeReport(cn, mn, whatIDidReport.toString());
if ( !disableCleanup() ){
asyncProfiler.ifPresent(profiler -> profiler.archiveProfilingResults(canonicalName, methodName, appDir));
archiveLog(canonicalName, methodName, buildLogA);
archiveLog(canonicalName, methodName, runLogA);
writeReport(canonicalName, methodName, whatIDidReport.toString());
if (!disableCleanup()) {
cleanTarget(app);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ public static boolean waitForTcpClosed(String host, int port, long loopTimeoutS)
return false;
}

// TODO we should get rid of it once Quarkus progresses with walid config per extension in generated examples
// TODO we should get rid of it once Quarkus progresses with valid config per extension in generated examples
public static void confAppPropsForSkeleton(String appDir) throws IOException {
// Config, see app-generated-skeleton/README.md
final String appRelativePath =
Expand Down
9 changes: 7 additions & 2 deletions testsuite/src/it/java/io/quarkus/ts/startstop/utils/Logs.java
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,16 @@ public static void archiveLog(String testClass, String testMethod, File log) thr
if (files != null) {
for (File file : files) {
if (!file.isDirectory()) {
Files.copy(file.toPath(), Paths.get(destDir.toString(), file.getName()), REPLACE_EXISTING);
Path target = Paths.get(destDir.toString(), file.getName());
LOGGER.info("Saving log to " + target);
Files.copy(file.toPath(), target, REPLACE_EXISTING);
}
}
}
} else {
Files.copy(log.toPath(), Paths.get(destDir.toString(), filename), REPLACE_EXISTING);
Path target = Paths.get(destDir.toString(), filename);
LOGGER.info("Saving log to " + target);
Files.copy(log.toPath(), target, REPLACE_EXISTING);
}
}

Expand All @@ -228,6 +232,7 @@ public static void writeReport(String testClass, String testMethod, String text)
Files.write(Paths.get(destDir.toString(), "report.md"), text.getBytes(UTF_8), StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING);
Path agregateReport = Paths.get(getLogsDir().toString(), "aggregated-report.md");
if (Files.notExists(agregateReport)) {
LOGGER.info("Saving report to " + agregateReport);
Files.write(agregateReport, ("# Aggregated Report\n\n").getBytes(UTF_8), StandardOpenOption.CREATE);
}
Files.write(agregateReport, text.getBytes(UTF_8), StandardOpenOption.APPEND);
Expand Down
Loading
Loading