-
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
Sporadic EOFException when running tests in Eclipse with jacoco extension #18571
Comments
/cc @geoand |
/cc @stuartwdouglas |
@stuartwdouglas This is probably a race between between the shutdown hook of quarkus-jacoco and the one from jacoco itself: I suppose this might not catch that jacoc shudown hook thread in all cases: https://github.com/quarkusio/quarkus/blob/main/test-framework/jacoco/runtime/src/main/java/io/quarkus/jacoco/runtime/ReportCreator.java#L57 I was thinking about trying to deduce from a WDYT? PS, OTOH, do we need the report at all when running from an IDE? |
I don't know why that code is not working, but that is likely the cause. I was thinking the solution would be to disable dump on exit, and instead use JMX to dump the file, but I don't know when I will get time to investigate this approach. If possible it would be nice to disable this for IDE based test runs, but AFAIK there is no easy way to detect this. |
Well, IDK about other IDEs, but in Eclipse you have that special runner: |
I guess maven and gradle have their own runners as well. We could look for the maven/gradle ones and if they are not present then disable jacoco. |
For But for gradle? These are the first stack frames for a test in
/cc @glefloch |
Yes, looking at the stack while running a test from gradle, the first test trace I can see is |
@glefloch do you think it's stable enough to use it to detect a non-IDE run? I'm not familiar with how IDEs run Gradle tests. |
Yes I think we can. |
Hi guys, My pipeline config looks like that :
|
So the above report means that this is not only an IDE problem. I had another look amd that |
Jacoco will create a zero length file early, we need to wait until it has actually been written. Fixes quarkusio#18571
Describe the bug
I'm seeing this frequently (but not always) in Eclipse at the end of a test execution:
This doesn't make the test fail, it only looks scary.
Expected behavior
No such exception
Actual behavior
Exception is logged (not sure about the integrity of the report, though).
To Reproduce
No reproducer available (yet?).
Environment (please complete the following information):
Output of
uname -a
orver
Ubuntu 20.04.2 LTS
Output of
java -version
Quarkus version or git rev
(also seen in 2.0.0)
Build tool (ie. output of
mvnw --version
orgradlew --version
)Maven 3.8.1 or in this case better to say Eclipse 2021-06.
Additional context
Seems to come from a shutdown hook?
Btw, Eclipse is running in the WSL2 Ubuntu dist (xfce, accessed via xrdp), not on Windows host.
The text was updated successfully, but these errors were encountered: