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

Regression in launching IntegrationTests instrumented with Jacoco-Maven-Plugin #19623

Closed
bvarner opened this issue Aug 24, 2021 · 7 comments · Fixed by #19641
Closed

Regression in launching IntegrationTests instrumented with Jacoco-Maven-Plugin #19623

bvarner opened this issue Aug 24, 2021 · 7 comments · Fixed by #19641
Labels
area/testing kind/bug Something isn't working
Milestone

Comments

@bvarner
Copy link
Contributor

bvarner commented Aug 24, 2021

Describe the bug

Quarkus 2.1.x (I'm not sure which version initiated it)

Trying to run integration tests (failsafe) with an ${argLine} provided from jacoco-maven-plugin that contains multiple arguments is broken. Looks like it's parsing the -javaagent argument for ,'s then splitting those into additional java command arguments, which is, clearly not valid.

Expected behavior

Expected behavior is for the ${argline} to not get mangled into separate arguments, and be quoted wholly as a single command line argument. Just like it was in 2.0.x.... below:

Executing [java, -javaagent:/home/bvarner/.m2/repository/org/jacoco/org.jacoco.agent/0.8.7/org.jacoco.agent-0.8.7-runtime.jar=destfile=/home/bvarner/Documents/work/AVT/spcd-rest-api/target/jacoco-quarkus.exec,append=true,exclclassloader=*QuarkusClassLoader, -Dquarkus.http.port=8081, -Dquarkus.http.ssl-port=8444, -Dtest.url=http://localhost:8081, -Dquarkus.log.file.path=/home/bvarner/Documents/work/AVT/spcd-rest-api/target/quarkus.log, -Dquarkus.log.file.enable=true, -Dquarkus.profile=it, -jar, /home/bvarner/Documents/work/AVT/spcd-rest-api/target/quarkus-app/quarkus-run.jar]
__  ____  __  _____   ___  __ ____  ______ 
 --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ 
 -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \   
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/   

Note, the ,append=true,exclclassloader=... bits are arguments to the javaagent, not the java executable.

Actual behavior

Running integration tests with 2.1.x:

Executing [java, -javaagent:/home/bvarner/.m2/repository/org/jacoco/org.jacoco.agent/0.8.7/org.jacoco.agent-0.8.7-runtime.jar=destfile=/home/bvarner/Documents/work/AVT/spcd-rest-api/target/jacoco-quarkus.exec, append=true, exclclassloader=*QuarkusClassLoader, -Dquarkus.http.port=8081, -Dquarkus.http.ssl-port=8444, -Dtest.url=http://localhost:8081, -Dquarkus.log.file.path=/home/bvarner/Documents/work/AVT/spcd-rest-api/target/quarkus.log, -Dquarkus.log.file.enable=true, -Dquarkus.profile=it, -jar, /home/bvarner/Documents/work/AVT/spcd-rest-api/target/quarkus-app/quarkus-run.jar]
Error: Could not find or load main class append=true

How to Reproduce?

https://quarkus.io/guides/tests-with-coverage#coverage-for-integration-tests

Output of uname -a or ver

Linux fibonacci 5.11.0-31-generic #33-Ubuntu SMP Wed Aug 11 13:19:04 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

Linux fibonacci 5.11.0-31-generic #33-Ubuntu SMP Wed Aug 11 13:19:04 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.1.x

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f) Maven home: /home/bvarner/.m2/wrapper/dists/apache-maven-3.6.3-bin/1iopthnavndlasol9gbrbg6bf2/apache-maven-3.6.3 Java version: 11.0.11, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64 Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "5.11.0-31-generic", arch: "amd64", family: "unix"

Additional information

No response

@bvarner bvarner added the kind/bug Something isn't working label Aug 24, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Aug 24, 2021

/cc @quarkusio/devtools

@bvarner bvarner changed the title Regression in launching Jacoco-Maven-Plugin for IntegrationTests Regression in launching IntegrationTests instrumented with Jacoco-Maven-Plugin Aug 24, 2021
@famod
Copy link
Member

famod commented Aug 24, 2021

/cc @geoand @stuartwdouglas

geoand added a commit to geoand/quarkus that referenced this issue Aug 25, 2021
The split is intended to happen on a whitespace character,
not the comma character used by properties

Fixes: quarkusio#19623
@geoand
Copy link
Contributor

geoand commented Aug 25, 2021

#19641 should fix the issue but it's probably too late to get it into 2.2.0.Final, which means it will likely be available from 2.2.1.Final

geoand added a commit that referenced this issue Aug 25, 2021
Fix quarkus.test.arg-line multiple args handling
@quarkus-bot quarkus-bot bot added this to the 2.3 - main milestone Aug 25, 2021
@bvarner
Copy link
Contributor Author

bvarner commented Aug 25, 2021

Thanks @geoand for responding on this one. I'll try it again on 2.2.1.Final. ;-)

@geoand
Copy link
Contributor

geoand commented Aug 25, 2021

Thanks for reporting!

@gsmet gsmet modified the milestones: 2.3 - main, 2.1.4.Final Aug 25, 2021
gsmet pushed a commit to gsmet/quarkus that referenced this issue Aug 25, 2021
The split is intended to happen on a whitespace character,
not the comma character used by properties

Fixes: quarkusio#19623
(cherry picked from commit 1982c8b)
gsmet pushed a commit to gsmet/quarkus that referenced this issue Aug 26, 2021
The split is intended to happen on a whitespace character,
not the comma character used by properties

Fixes: quarkusio#19623
(cherry picked from commit 1982c8b)
gsmet pushed a commit to gsmet/quarkus that referenced this issue Aug 30, 2021
The split is intended to happen on a whitespace character,
not the comma character used by properties

Fixes: quarkusio#19623
(cherry picked from commit 1982c8b)
@xtaixe
Copy link

xtaixe commented Sep 2, 2021

@bvarner did you get JaCoCo working with integration tests? Could you share how or maybe an example and comment on #18559 one way or another?

@bvarner
Copy link
Contributor Author

bvarner commented Sep 2, 2021

Yes, it's fixed in 2.2.1.Final.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants