Skip to content

Reuse maven-surefire-plugin environmentVariables and systemPropertyVariables for continuous testing #24249

@famod

Description

@famod

Description

Currenty, I need to "duplicate" most of the following maven-surefire-plugin configuration to have a consistent behaviour in continuous testing:

<environmentVariables>
    <!-- https://www.testcontainers.org/features/configuration -->
    <TESTCONTAINERS_CHECKS_DISABLE>true</TESTCONTAINERS_CHECKS_DISABLE>
    <TESTCONTAINERS_REUSE_ENABLE>true</TESTCONTAINERS_REUSE_ENABLE>
    <TESTCONTAINERS_RYUK_DISABLED>true</TESTCONTAINERS_RYUK_DISABLED>
</environmentVariables>
 <!-- keep quarkus-maven-plugin (dev and test) in sync with the following! -->
<systemPropertyVariables>
    <java.net.useSystemProxies>true</java.net.useSystemProxies>
    <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
    <maven.home>${maven.home}</maven.home>
    <!-- pass on all "dynamic" version segments for Maven bootstrapping in @QuarkusTest -->
    <sha1>${sha1}</sha1>
    <changelist>${changelist}</changelist>
    <test.container.db.discriminator>${test.container.db.discriminator}</test.container.db.discriminator>
    <user.timezone>UTC</user.timezone>
</systemPropertyVariables>

(I'm setting most of the above via environmentVariables and systemProperties for quarkus-maven-plugin)

It would be nice if those variables would be carried over automatically.
Do we also need to be able to exclude specific variables?

Implementation ideas

maven-jar-plugin config is already read to properly support test-jar in- and excludes, so this wouldn't be totally new, but it's done in a very different place.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions