Skip to content

Use hosted environment for CacheDependency tests #464

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

Merged
merged 1 commit into from
Jan 9, 2024

Conversation

twsouthwick
Copy link
Member

@twsouthwick twsouthwick commented Jan 9, 2024

This moves tests that require CacheDependency into CoreServices. The implementation of this requires HttpRuntime.Cache to be set in some code paths and so we need to use the SelfHostedTests collection to ensure this is setup correctly and doesn't stomp on other tests. The change looks bigger than it is because of code movement - the only real change is the change to DependentItemCallback to use an actual host (test was originally written before this pattern was used in the codebase).

The implementation of this requires HttpRuntime.Cache to be set in some code paths and so we need to use the SelfHostedTests collection to ensure this is setup correctly and doesn't stomp on other tests.
@twsouthwick
Copy link
Member Author

twsouthwick commented Jan 9, 2024

@joperezr looks like the build servers might have changed as I saw a test failure on my recent change. It was a race condition in the structure of the test itself so not a regression or anything, but this fixes that.

@twsouthwick twsouthwick merged commit 6f644d1 into main Jan 9, 2024
@twsouthwick twsouthwick deleted the cache-dependency-tests branch January 9, 2024 21:59
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.

2 participants