-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Incompatible with jacoco due to shutdown race condition #7344
Comments
@XakepSDK did you try setting the |
@XakepSDK I'm going to close this issue, as it seems to me that |
Hi again! I'm back, i had no internet, lockdowns =( |
@XakepSDK oh sorry, I didn't see the |
Can this ticket be reopened?
Or we could read stdout of PID and wait until it's EOF, but i guess that would bring too much platform specific code. |
@XakepSDK I'm trying it with the file first, as that doesn't require any changes to jetty code outside of the jetty-maven-plugin. Generating the pid would require changes in the ShutdownMonitor class outside of the jetty-maven-plugin. It's doable, but changing what is generated might mess up other folks who are parsing the output of the ShutdownMonitor and not expecting to deal with the new message. I'm reopening. |
Signed-off-by: Jan Bartel <janb@webtide.com>
Signed-off-by: Jan Bartel <janb@webtide.com>
Signed-off-by: Jan Bartel <janb@webtide.com>
Need to reopen this issue: when using the JettyStopMojo from in the same process (ie bound |
Fixed via #7639 amongst others. |
Jetty version(s)
jetty-maven-plugin 11.0.7
Java version/vendor
(use: java -version)
openjdk version "17.0.1" 2021-10-19
OpenJDK Runtime Environment (build 17.0.1+12)
OpenJDK 64-Bit Server VM (build 17.0.1+12, mixed mode)
OS type/version
Arch Linux
Description
I'm using jetty and jacoco to generate integration tests coverage.
Jetty shutdowns in post-integration-test phase and jacoco's report-integration goal runs at verify phase.
When i run stop goal in post-integration-test phase, plugin quits immediately even if jetty's VM is not shut down yet.
Because VM is not shutdown yet, jacoco agent that is attached to jetty's VM has not finished writing coverage data file.
While jetty's VM is not shutdown yet, jacoco in project that started and stopped jetty starts collecting report.
It may lead to 3 results:
Jetty maven plugin should check if VM is shut down or not.
stopWait
tag does not help, feels like it doesn't check anything.How to reproduce?
Workaround:
Put some plugin in-between that might halt execution for a split second, like this.
If just having this plugin in-between does not help, launch maven with
-Dwait=true
It will ask you to press enter, wait a sec or two and press enter.
The text was updated successfully, but these errors were encountered: