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

Clear the global collections metadata cache between each test #11794

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

chrisguidry
Copy link
Collaborator

No description provided.

@chrisguidry chrisguidry requested a review from a team as a code owner January 31, 2024 20:36
Copy link

netlify bot commented Jan 31, 2024

Deploy Preview for prefect-docs-preview ready!

Name Link
🔨 Latest commit cd5c444
🔍 Latest deploy log https://app.netlify.com/sites/prefect-docs-preview/deploys/65baaf51c5ec100008f21d01
😎 Deploy Preview https://deploy-preview-11794--prefect-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Comment on lines +383 to +387
@pytest.fixture(autouse=True)
def cleared_collection_registry_cache():
collections.GLOBAL_COLLECTIONS_VIEW_CACHE.clear()
yield
collections.GLOBAL_COLLECTIONS_VIEW_CACHE.clear()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Here's the heart of the change. Since there are multiple test suites that might need to clear this cache, I decided to make the global one autouse=True and remove the others we've had sprinkled throughout

@chrisguidry chrisguidry merged commit 1bb9c73 into main Jan 31, 2024
61 checks passed
@chrisguidry chrisguidry deleted the fix-test-flake branch January 31, 2024 22:40
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