-
Notifications
You must be signed in to change notification settings - Fork 1.3k
CSHARP-5778: Update search index helper tests #1806
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
ajcvickers
commented
Nov 6, 2025
- Ensure index definitions are valid per https://www.mongodb.com/docs/atlas/atlas-search/index-definitions/
- Use unique index name for each variation
- Ensure index definitions are valid per https://www.mongodb.com/docs/atlas/atlas-search/index-definitions/ - Use unique index name for each variation
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 PR improves test maintainability for Atlas Search Index tests by refactoring index name generation and addressing test isolation issues. The changes ensure that tests with different parameters (async vs sync, with/without fields) create uniquely named indexes to avoid conflicts.
- Introduced a helper method
CreateIndexNameto generate unique index names based on test parameters - Updated index definitions to use more realistic field configurations
- Refactored test methods to use the new helper and apply correct index definitions based on test parameters
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tests/MongoDB.Driver.Tests/Search/AtlasSearchIndexManagmentTests.cs
Outdated
Show resolved
Hide resolved
|
Assigned |
I'm not out of office anymore by the way 😁 |
papafe
left a comment
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.
LGTM!
There is just an extra line
…ts.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@papafe Thanks! Fixed that line. |
|
@papafe Can you approve again, since including the Copilot commit reset the Approved status? |