-
Notifications
You must be signed in to change notification settings - Fork 553
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
Forked process doing cleanup at_exit can cause duplicate coverage reports #228
Comments
Oh, and I forgot to mention the best bit - if I debug with |
Hi Carsten, could you please try the 0.8.0 prerelease from rubygems? It implements a lockfile for the resultset merging and should fix your problem |
Thanks for the quick response Christoph! Tried it just now, but unfortunately that doesn't seem to fix the issue. I still get two runs of the coverage report with different percentages:
Just to make sure we're on the same page, here's the Ruby version I'm using:
and a list of my local gems:
(I also tried uninstalling 0.7.1 just in case, same result) I updated my test case repo with the new Gemfile, just in case you want to see that. Let me know if you need anything else, please. |
So I've found a workaround for my code at least. The solution was to add an |
@HerbCSO Cool, thanks! I'll keep this open as a placeholder for a standardized solution built into simplecov |
When you run
bundle exec rspec
on this repo (that is the most minimal test case I can come up with), there will be two SimpleCov reports generated, with very different coverage percentages. The fact that theUtilityConfig
class has a forked process that is cleaned up in anat_exit
call seems to cause some sort of race condition in SimpleCov (I have not been able to figure out where this occurs).Sample output on my system:
The second Coverage report is wrong. If it wasn't for the fact that it overwrites the results of the first (correct) one, I wouldn't mind so much... ;]
Please let me know if I can help with any other input/background.
The text was updated successfully, but these errors were encountered: