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

Abstract the filesystem for caching transport tests #1810

Merged
merged 7 commits into from
Jul 25, 2022

Conversation

mattjohnsonpint
Copy link
Contributor

@mattjohnsonpint mattjohnsonpint commented Jul 25, 2022

Adds a simple wrapper for file i/o operations use by the caching transport.

In tests, uses a fake implementation that wraps the in-memory mock filesystem provided by https://github.com/TestableIO/System.IO.Abstractions. (use in tests only - no dependency added to Sentry)

This removes the timing variability caused by disk access that some of our tests were flaky on, such as Init_WithCache_BlocksUntilExistingCacheIsFlushed. I made some other minor changes to that test also. I think we can re-enable it in CI now.

#skip-changelog

@mattjohnsonpint mattjohnsonpint marked this pull request as ready for review July 25, 2022 20:59
@mattjohnsonpint mattjohnsonpint merged commit 2706a79 into main Jul 25, 2022
@mattjohnsonpint mattjohnsonpint deleted the abstract-filesystem branch July 25, 2022 21:27
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

2 participants