Skip to content

Commit

Permalink
Refactoring whitelists so as it picks everything it should and no more
Browse files Browse the repository at this point in the history
  • Loading branch information
Karm committed Apr 8, 2024
1 parent 66ff363 commit 48c3d16
Showing 1 changed file with 49 additions and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
import org.graalvm.home.Version;
import org.graalvm.tests.integration.utils.versions.UsedVersion;

import java.util.ArrayList;
import java.util.List;
import java.util.regex.Pattern;

import static org.graalvm.tests.integration.utils.Commands.QUARKUS_VERSION;
Expand Down Expand Up @@ -96,6 +98,7 @@ public Pattern[] get(boolean inContainer) {
return new Pattern[]{
// Well, the RestClient demo probably should do some cleanup before shutdown...?
Pattern.compile(".*Closing a class org.jboss.resteasy.client.*"),
Pattern.compile(".*Please close clients yourself.*"),
// Unused argument on new Graal; Quarkus uses it for backward compatibility.
Pattern.compile(".*Ignoring server-mode native-image argument --no-server.*"),
// Windows specific warning
Expand Down Expand Up @@ -135,61 +138,54 @@ public Pattern[] get(boolean inContainer) {
QUARKUS_MP_ORM_DBS_AWT {
@Override
public Pattern[] get(boolean inContainer) {
final List<Pattern> p = new ArrayList<>();
// Our config
p.add(Pattern.compile(".*Unrecognized configuration key \"quarkus.version\".*"));
// Testcontainers might not need it, depends on your system.
p.add(Pattern.compile(".*Attempted to read Testcontainers configuration file.*"));
p.add(Pattern.compile(".*does not support the reuse of containers.*"));
// 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,.*"));
// RestEasy intermittently
p.add(Pattern.compile(".*Closing a class org.jboss.resteasy.client.*"));
p.add(Pattern.compile(".*Please close clients yourself.*"));
if (QUARKUS_VERSION.majorIs(3)) {
return new Pattern[] {
// Our config
Pattern.compile(".*Unrecognized configuration key \"quarkus.version\".*"),
// Testcontainers might not need it, depends on your system.
Pattern.compile(".*Attempted to read Testcontainers configuration file.*"),
Pattern.compile(".*does not support the reuse of containers.*"),
Pattern.compile(".*org.tes.uti.ResourceReaper.*"),
// GC warning thrown in GraalVM >= 22.0 under constraint environment (e.g. CI) see https://github.com/Karm/mandrel-integration-tests/issues/68
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
Pattern.compile(".* Failures: 0, Errors: 0,.*"),
// Benign JPA
Pattern.compile(".*Unknown SEQUENCE: 'db[0-9].db[0-9]entity_SEQ'.*"),
Pattern.compile(".*does not need to be specified explicitly using 'hibernate.dialect'.*"),
Pattern.compile(".*DDL \"drop sequence db[0-9]entity_SEQ\".*"),
Pattern.compile(".*sequence \"db[0-9]entity_seq\" does not exist, skipping.*"),
Pattern.compile(".*table \"db[0-9]entity\" does not exist, skipping.*"),
Pattern.compile(".*Unable to determine a database type for default datasource.*"),
Pattern.compile(".*Warning Code: 0, SQLState: 00000.*"),
// OpenTelemetry
Pattern.compile(".*No BatchSpanProcessor delegate specified, no action taken.*"),
Pattern.compile(".*Connection refused: .*:4317.*"),
Pattern.compile(".*The request could not be executed.*:4317.*"),
Pattern.compile(".*quarkus.otel.traces.eusp.enabled=true. Please AVOID.*"),
// Warnings about experimental options, we could probably wrap all those up in -H:+UnlockExperimentalVMOptions
Pattern.compile(".*The option '-H:BuildOutputJSONFile=' is experimental.*"),
Pattern.compile(".*The option '-H:ReflectionConfigurationFiles=reflection-config.json' is experimental.*"),
Pattern.compile(".*The option '-H:ReflectionConfigurationResources=.*netty-transport/reflection-config.json' is experimental.*"),
Pattern.compile(".*The option '-H:IncludeResourceBundles=yasson-messages' is experimental.*"),
Pattern.compile(".*The option '-H:ResourceConfigurationFiles=resource-config.json' is experimental.*"),
};
} else {
// Oldest Quarkus 2.x default
return new Pattern[] {
// GC warning thrown in GraalVM >= 22.0 under constraint environment (e.g. CI) see https://github.com/Karm/mandrel-integration-tests/issues/68
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
Pattern.compile(".* Failures: 0, Errors: 0,.*"),
// Jaeger talks to nobody
Pattern.compile(".*io.jaegertracing.internal.exceptions.SenderException.*"),
// Benign JPA
Pattern.compile(".*Warning Code: 0, SQLState: 00000.*"),
Pattern.compile(".*table \"db[0-9]entity\" does not exist.*"),
Pattern.compile(".*Unknown SEQUENCE: 'db[0-9].hibernate_sequence'.*"),
Pattern.compile(".*Unable to determine a database type for default datasource.*"),
Pattern.compile(".* sequence \"hibernate_sequence\" does not exist.*"),
Pattern.compile(".*DDL \"drop sequence hibernate_sequence\" .*"),
// Our config
Pattern.compile(".*Unrecognized configuration key \"quarkus.version\".*"),
// Testcontainers might not need it, depends on your system.
Pattern.compile(".*Attempted to read Testcontainers configuration file.*"),
Pattern.compile(".*does not support the reuse of containers.*"),
};
// Testcontainers
p.add(Pattern.compile(".*org.tes.uti.ResourceReaper.*"));
// Benign JPA
p.add(Pattern.compile(".*Unknown SEQUENCE: 'db[0-9].db[0-9]entity_SEQ'.*"));
p.add(Pattern.compile(".*does not need to be specified explicitly using 'hibernate.dialect'.*"));
p.add(Pattern.compile(".*DDL \"drop sequence db[0-9]entity_SEQ\".*"));
p.add(Pattern.compile(".*sequence \"db[0-9]entity_seq\" does not exist, skipping.*"));
p.add(Pattern.compile(".*table \"db[0-9]entity\" does not exist, skipping.*"));
p.add(Pattern.compile(".*Unable to determine a database type for default datasource.*"));
p.add(Pattern.compile(".*Warning Code: 0, SQLState: 00000.*"));
// OpenTelemetry
p.add(Pattern.compile(".*No BatchSpanProcessor delegate specified, no action taken.*"));
p.add(Pattern.compile(".*Connection refused: .*:4317.*"));
p.add(Pattern.compile(".*The request could not be executed.*:4317.*"));
p.add(Pattern.compile(".*quarkus.otel.traces.eusp.enabled=true. Please AVOID.*"));
// Warnings about experimental options, we could probably wrap all those up in -H:+UnlockExperimentalVMOptions
p.add(Pattern.compile(".*The option '-H:BuildOutputJSONFile=' is experimental.*"));
p.add(Pattern.compile(".*The option '-H:ReflectionConfigurationFiles=reflection-config.json' is experimental.*"));
p.add(Pattern.compile(".*The option '-H:ReflectionConfigurationResources=.*netty-transport/reflection-config.json' is experimental.*"));
p.add(Pattern.compile(".*The option '-H:IncludeResourceBundles=yasson-messages' is experimental.*"));
p.add(Pattern.compile(".*The option '-H:ResourceConfigurationFiles=resource-config.json' is experimental.*"));
} else if (QUARKUS_VERSION.majorIs(2)) {
// Jaeger talks to nobody
p.add(Pattern.compile(".*io.jaegertracing.internal.exceptions.SenderException.*"));
// Benign JPA
p.add(Pattern.compile(".*Warning Code: 0, SQLState: 00000.*"));
p.add(Pattern.compile(".*table \"db[0-9]entity\" does not exist.*"));
p.add(Pattern.compile(".*Unknown SEQUENCE: 'db[0-9].hibernate_sequence'.*"));
p.add(Pattern.compile(".*Unable to determine a database type for default datasource.*"));
p.add(Pattern.compile(".* sequence \"hibernate_sequence\" does not exist.*"));
p.add(Pattern.compile(".*DDL \"drop sequence hibernate_sequence\" .*"));
}
return p.toArray(new Pattern[0]);
}
},
DEBUG_QUARKUS_BUILDER_IMAGE_VERTX {
Expand Down

0 comments on commit 48c3d16

Please sign in to comment.