Skip to content

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

StephenMolloy
Copy link
Member

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:

  • Added a new [OuterLoop] test Reasonable_Delay in HostFileChangeMonitorTest.cs to verify that cache items expire promptly when a monitored file changes.
  • Refactored the SetupMonitoring helper to accept a unique ID, ensuring test file isolation and reducing interference between tests. [1] [2]

Test annotation and platform restriction cleanup:

  • Removed [ActiveIssue], [PlatformSpecific], and [SkipOnPlatform] annotations from several tests in both HostFileChangeMonitorTest.cs and MemoryCacheTest.cs, enabling broader test execution across platforms and configurations. [1] [2] [3] [4] [5] [6] [7]

General code and import maintenance:

  • Cleaned up using directives in HostFileChangeMonitorTest.cs to remove unnecessary imports and improve code clarity.

@Copilot Copilot AI review requested due to automatic review settings August 9, 2025 00:49
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Aug 9, 2025
Copy link
Contributor

@Copilot Copilot AI left a 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

@StephenMolloy StephenMolloy requested a review from mconnew August 9, 2025 00:52
@StephenMolloy
Copy link
Member Author

For @mconnew, here's the comment you had on the outdated version of this PR: #118508 (review)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant