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

Bug Report: Arquillian adapter does not pass system properties to tests #6589

Open
tandraschko opened this issue Mar 19, 2024 · 1 comment
Open
Assignees
Labels
Status: Open Issue has been triaged by the front-line engineers and is being worked on verification Type: Bug Label issue as a bug defect

Comments

@tandraschko
Copy link

tandraschko commented Mar 19, 2024

Brief Summary

Currently i reactivate all integrationtests of DeltaSpike and it seems that the system properties are available in @Deployment but not in the single tests.
In DeltaSpike we pass the CDI container and version to the arqullian tests ("cdicontainer.version" system property) and skip some tests because they are broken in different Weld versions.
For Payara this is done via surefire-plugin:
https://github.com/apache/deltaspike/blob/master/deltaspike/parent/code/pom.xml#L898

Expected Outcome

Its available in both ln58 and ln79:
https://github.com/apache/deltaspike/blob/master/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc008/ClassLevelInterceptorTest.java#L58

Current Outcome

Its only available in @Deployment but not in the single tests.

I even tried to add it additionaly via:

    <container qualifier="payara-build-managed">
        <configuration>
            <property name="payaraHome">${arquillian.payara_home}</property>
            <property name="adminPort">24848</property>
            <property name="properties">cdicontainer.version=weld-5.0.1</property>
            <property name="serverSystemProperties">cdicontainer.version=weld-5.0.1</property>
        </configuration>
    </container>

Reproducer

clone deltaspike and run the build via:

mvn clean install -Ppayara-build-managed

It should not reach the workaround https://github.com/apache/deltaspike/blob/master/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc008/ClassLevelInterceptorTest.java#L82
but it does

Operating System

Windows/Linux

JDK Version

Correto 17

Payara Distribution

Payara Server Full Profile

@tandraschko tandraschko added Status: Open Issue has been triaged by the front-line engineers and is being worked on verification Type: Bug Label issue as a bug defect labels Mar 19, 2024
@lprimak
Copy link
Contributor

lprimak commented Mar 19, 2024

Hi, Thomas,

There is a separate arquillian module available to propagate system properties into the container (and thus remote tests)

 <dependency>
    <groupId>fish.payara.arquillian</groupId>
    <artifactId>environment-setup</artifactId>
    <version>${payara.arquillian.container.version}</version>
    <scope>test</scope>
</dependency>

It uses Arquillian remote extensions to propagate values of property files to remote tests.

For an example, see https://github.com/payara/MicroProfile-TCK-Runners/blob/f0f7cd316a59c359a2d6e4481a2cf7182e449ef2/MicroProfile-Config/src/test/resources/system-properties.properties#L2

Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Open Issue has been triaged by the front-line engineers and is being worked on verification Type: Bug Label issue as a bug defect
Projects
None yet
Development

No branches or pull requests

3 participants