-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Re-enable tests for Sys.RT.Caching #118551
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
Conversation
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.
Pull Request Overview
This pull request re-enables and improves tests for the System.Runtime.Caching
library by removing obsolete test annotations and enhancing test coverage. The changes focus on making tests run more broadly across platforms and improving their reliability through better isolation.
- Removes restrictive
[ActiveIssue]
,[PlatformSpecific]
, and[SkipOnPlatform]
annotations that were preventing tests from running - Adds a new comprehensive test for file change monitoring with cache expiration
- Improves test isolation by making the
SetupMonitoring
helper accept unique identifiers
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
MemoryCacheTest.cs |
Removes outdated test annotations to enable broader test execution across platforms |
HostFileChangeMonitorTest.cs |
Removes test restrictions, improves test isolation with unique IDs, and adds new file change monitoring test |
src/libraries/System.Runtime.Caching/tests/System.Runtime.Caching/HostFileChangeMonitorTest.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Runtime.Caching/tests/System.Runtime.Caching/HostFileChangeMonitorTest.cs
Outdated
Show resolved
Hide resolved
For @mconnew, here's the comment you had on the outdated version of this PR: #118508 (review) |
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.
This pull request updates the
System.Runtime.Caching
test suite to improve coverage and maintainability. The main changes include removing obsolete or restrictive test annotations, refactoring test helpers for better isolation, and adding a new test to verify cache item expiration behavior when file dependencies change.Test coverage and reliability improvements:
[OuterLoop]
testReasonable_Delay
inHostFileChangeMonitorTest.cs
to verify that cache items expire promptly when a monitored file changes.SetupMonitoring
helper to accept a unique ID, ensuring test file isolation and reducing interference between tests. [1] [2]Test annotation and platform restriction cleanup:
[ActiveIssue]
,[PlatformSpecific]
, and[SkipOnPlatform]
annotations from several tests in bothHostFileChangeMonitorTest.cs
andMemoryCacheTest.cs
, enabling broader test execution across platforms and configurations. [1] [2] [3] [4] [5] [6] [7]General code and import maintenance:
HostFileChangeMonitorTest.cs
to remove unnecessary imports and improve code clarity.