Skip to content

Commit

Permalink
Fixes race condition with certain Podman version
Browse files Browse the repository at this point in the history
  • Loading branch information
Karm committed Nov 19, 2024
1 parent 15047b4 commit 5b7c947
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
5 changes: 4 additions & 1 deletion apps/quarkus-spöklik-encoding/threshold.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@ linux.container.time.to.first.ok.request.threshold.ms=1500
linux.container.RSS.threshold.kB=55000
@IfQuarkusVersion(min ="3.7.0")
linux.container.executable.size.threshold.kB=51313

@IfQuarkusVersion(min ="3.8.6")
linux.container.executable.size.threshold.kB=51991
@IfQuarkusVersion(min ="3.15.1")
linux.container.executable.size.threshold.kB=52860
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import java.nio.file.Paths;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.regex.Pattern;

import static org.graalvm.tests.integration.utils.Commands.QUARKUS_VERSION;
Expand All @@ -59,6 +60,7 @@
import static org.graalvm.tests.integration.utils.Commands.runCommand;
import static org.graalvm.tests.integration.utils.Commands.stopAllRunningContainers;
import static org.graalvm.tests.integration.utils.Commands.stopRunningContainer;
import static org.graalvm.tests.integration.utils.Commands.waitForContainerLogToMatch;
import static org.graalvm.tests.integration.utils.Commands.waitForTcpClosed;

/**
Expand Down Expand Up @@ -106,6 +108,10 @@ public void testRuntime(TestInfo testInfo, Apps app, Map<String, String> switchR
Logs.appendln(report, appDir.getAbsolutePath());
Logs.appendlnSection(report, String.join(" ", cmd));

if (app.runtimeContainer != ContainerNames.NONE) {
waitForContainerLogToMatch(app.runtimeContainer.name, Pattern.compile(".*started.*"), 5, 1, TimeUnit.SECONDS);
}

// Test web pages
final long timeToFirstOKRequest = WebpageTester.testWeb(app.urlContent.urlContent[0][0], 10, app.urlContent.urlContent[0][1], true);
LOGGER.info("Testing web page content...");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,15 @@ public Pattern[] get(boolean inContainer) {
Pattern.compile(".*time=.*level=warning.*msg=.*S.gpg-agent.*since it is a socket.*"),
// Testcontainers, depends on local setup. Not our test issue.
Pattern.compile(".*Please ignore if you don't have images in an authenticated registry.*"),
// Common new Q versions
Pattern.compile(".*io.quarkus.narayana.jta.runtime.graal.DisableLoggingFeature.*"),
// Podman / Docker extension incompatibilities with Podman versions
Pattern.compile(".*Database JDBC URL \\[undefined/unknown\\].*"),
Pattern.compile(".*Database driver: undefined/unknown.*"),
Pattern.compile(".*Autocommit mode: undefined/unknown.*"),
Pattern.compile(".*Minimum pool size: undefined/unknown.*"),
Pattern.compile(".*Isolation level: <unknown>.*"),
Pattern.compile(".*Maximum pool size: undefined/unknown.*"),
};
}
},
Expand Down Expand Up @@ -168,12 +177,14 @@ public Pattern[] get(boolean inContainer) {
p.add(Pattern.compile(".*Attempted to read Testcontainers configuration file.*"));
p.add(Pattern.compile(".*does not support the reuse of containers.*"));
// Ryuk can spit warning that is on its own line.
p.add(Pattern.compile("^\\[WARNING\\]$"));
p.add(Pattern.compile("^\\[WARNING\\][\\s\\t]*$"));
// GC warning thrown in GraalVM >= 22.0 under constraint environment (e.g. CI)
// see https://github.com/Karm/mandrel-integration-tests/issues/68
p.add(Pattern.compile(".*GC warning: [0-9.]+s spent in [0-9]+ GCs during the last stage, taking up [0-9]+.[0-9]+% of the time.*"));
// JUnit output
p.add(Pattern.compile(".* Failures: 0, Errors: 0,.*"));
// Docker image extension being mean
p.add(Pattern.compile(".*Using executable podman within the quarkus-container-image-docker.*"));
if (QUARKUS_VERSION.majorIs(3) || QUARKUS_VERSION.isSnapshot()) {
// Testcontainers
p.add(Pattern.compile(".*org.tes.uti.ResourceReaper.*"));
Expand Down

0 comments on commit 5b7c947

Please sign in to comment.