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

Adds retry functionality to copy back the original assembly. #35

Merged
merged 3 commits into from Apr 10, 2018

Conversation

pms1969
Copy link
Contributor

@pms1969 pms1969 commented Apr 9, 2018

Fixes: #25

I've run this locally, and it seems fine. Would be handy to have someone else verify that.

@pms1969
Copy link
Contributor Author

pms1969 commented Apr 9, 2018

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?

@coveralls
Copy link

coveralls commented Apr 9, 2018

Pull Request Test Coverage Report for Build #53

  • 0 of 0 (NaN%) changed or added relevant lines in 0 files are covered.
  • 44 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+1.9%) to 80.189%

Files with Coverage Reduction New Missed Lines %
/src/coverlet.core/Helpers/InstrumentationHelper.cs 21 48.94%
/src/coverlet.core/Coverage.cs 23 30.0%
Totals Coverage Status
Change from base Build #47: 1.9%
Covered Lines: 340
Relevant Lines: 424

💛 - Coveralls

@tonerdo
Copy link
Collaborator

tonerdo commented Apr 9, 2018

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

@pms1969
Copy link
Contributor Author

pms1969 commented Apr 9, 2018

uno momento

Copy link
Collaborator

@tonerdo tonerdo left a 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

currentSleep *= 2;
return sleep;
};
RetryHelper.Retry(() => InstrumentationHelper.RestoreOriginalModule(result.ModulePath, _identifier), retryStrategy, 10);
Copy link
Collaborator

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

currentSleep *= 2;
return sleep;
};
RetryHelper.Retry(() => File.Delete(result.HitsFilePath), retryStrategy, 10);
Copy link
Collaborator

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

Copy link
Collaborator

@tonerdo tonerdo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@tonerdo tonerdo merged commit 8e9c8c4 into coverlet-coverage:master Apr 10, 2018
NorekZ pushed a commit to NorekZ/coverlet that referenced this pull request Nov 8, 2018
Adds retry functionality to copy back the original assembly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants