-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
QuarkusIntegrationTest: argLine is also given to docker run, which doesn't work because jacoco sets -javaagent #19017
Comments
/cc @geoand |
I don't want to revert back to that TBH. What does your test scenario look like that involves running both the jar artifact and the docker artifact? |
The POM is setup like: https://quarkus.io/guides/tests-with-coverage#coverage-for-integration-tests
This works fine on Quarkus 2.0, but fails on 2.1 since the argLine is being passed as docker argument. Since arguments being passed to java/native or docker are nothing alike, it doesn't make much sense to me to share them in one config property. |
But you can fairly easily configure some Maven profiles so set the appropriate value for each environment you are building in. I really don't plan on moving back to the previous state unless there is a very good reason to |
Sure I can, it just doesn't feel right that a property has 3 different meanings (jvm argument, docker argument or quarkus native executable argument). Ah well, at least change the documentation: <configuration>
<systemPropertyVariables>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
<maven.home>${maven.home}</maven.home>
<quarkus.test.argLine>${argLine}</quarkus.test.argLine>
<!-- If your integration tests require a different profile, you can set that here as well.
<quarkus.test.native-image-profile>it</quarkus.test.native-image-profile>
-->
</systemPropertyVariables>
</configuration> Because following this, the native executable will be run with the jacoco javaagent. |
Sure that sounds reasonable. Would you like to contribute that documentation fix? |
In another issue the ability to set
quarkus.test.arg-line
was added, in order to make Jacoco work when running integration test using java executable.However the argLine is also used for docker runs, which fails because '-javaagent' is not a valid docker argument.
Suggestion:
Instead of specifying one
arg-line
, add the ability to specifiy an arg-line per artifact type, so:quarkus/test-framework/junit5/src/main/java/io/quarkus/test/junit/launcher/ConfigUtil.java
Line 19 in f4755fc
The text was updated successfully, but these errors were encountered: