Skip to content

Randomize the collection name to avoid collisions when search indexes are created or dropped asynchronously#2859

Merged
GromNaN merged 1 commit intodoctrine:2.13.xfrom
GromNaN:fix-atlas-tests
Oct 17, 2025
Merged

Randomize the collection name to avoid collisions when search indexes are created or dropped asynchronously#2859
GromNaN merged 1 commit intodoctrine:2.13.xfrom
GromNaN:fix-atlas-tests

Conversation

@GromNaN
Copy link
Copy Markdown
Member

@GromNaN GromNaN commented Oct 17, 2025

Q A
Type bug
BC Break no
Fixed issues

Summary

Search indexes are created and dropped asynchronously. Sometimes the search index from a previous test still exists when the new test is run, even if the collection has been dropped.

By setting a random collection name, we prevent side effects.

I think the issue arises from the new version of MongoDB Atlas Local.

@GromNaN GromNaN added this to the 2.13.0 milestone Oct 17, 2025
@GromNaN GromNaN requested a review from jmikola October 17, 2025 19:08
@GromNaN GromNaN enabled auto-merge (squash) October 17, 2025 19:17
@GromNaN GromNaN added the Bug label Oct 17, 2025
Copy link
Copy Markdown
Member

@jmikola jmikola left a comment

Choose a reason for hiding this comment

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

The WC addition seems unrelated to randomized collection names, but I do remember you adding a WC to data fixtures in a previous test. Was this just overlooked?

@GromNaN GromNaN merged commit c73060e into doctrine:2.13.x Oct 17, 2025
23 checks passed
@GromNaN
Copy link
Copy Markdown
Member Author

GromNaN commented Oct 17, 2025

Yes, that was missing. The test was randomly failing with the new version of MongoDB Atlas Local without the WC.

@GromNaN GromNaN deleted the fix-atlas-tests branch October 17, 2025 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants