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
Adds retry functionality to copy back the original assembly. #35
Conversation
That's an interesting result from AppVeyor for the debug build. :-) How does that work? Is it using the older version, or is it dog-fooding off the new code? |
Pull Request Test Coverage Report for Build #53
💛 - Coveralls |
Thanks for this! Can you please do the same on this line https://github.com/finbourne/coverlet/blob/590cbc3bba8f1655960da349f0596539f121653d/src/coverlet.core/Coverage.cs#L133. That's the cause of the Windows CI failure |
uno momento |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few changes
src/coverlet.core/Coverage.cs
Outdated
currentSleep *= 2; | ||
return sleep; | ||
}; | ||
RetryHelper.Retry(() => InstrumentationHelper.RestoreOriginalModule(result.ModulePath, _identifier), retryStrategy, 10); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move all this logic into InstrumentationHelper.RestoreOriginalModule
. You can put the code in that function into the Retry(() => {}
delegate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
src/coverlet.core/Coverage.cs
Outdated
currentSleep *= 2; | ||
return sleep; | ||
}; | ||
RetryHelper.Retry(() => File.Delete(result.HitsFilePath), retryStrategy, 10); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same thing here. Create an InstrumentationHelper.DeleteHitsFile
and basically move this block into that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Adds retry functionality to copy back the original assembly.
Fixes: #25
I've run this locally, and it seems fine. Would be handy to have someone else verify that.