Skip to content

CSHARP-5592: Separate unit tests into dedicated variants #1695

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

Merged
merged 4 commits into from
May 23, 2025

Conversation

sanych-sun
Copy link
Member

In this PR I've marked all tests that require MongoDB connection with Category=Integration. Then I've adjusted cake to run ONLY Integration tests and created a new variants to run unit tests (tests that do not belong to Integration category).

@sanych-sun sanych-sun requested a review from a team as a code owner May 17, 2025 00:38
@sanych-sun sanych-sun added the chore Label to hide PR from generated Release Notes label May 17, 2025
@sanych-sun sanych-sun requested review from papafe and removed request for a team May 17, 2025 00:38
Oleksandr Poliakov added 2 commits May 16, 2025 17:43
@@ -18,10 +18,12 @@
using MongoDB.Bson;
using MongoDB.Driver.Linq.Linq3Implementation;
using MongoDB.Driver.Linq.Linq3Implementation.Translators.ExpressionToExecutableQueryTranslators;
using MongoDB.TestHelpers.XunitExtensions;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why was this added?

Copy link
Contributor

Choose a reason for hiding this comment

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

Same also in some other files

Copy link
Member Author

@sanych-sun sanych-sun May 20, 2025

Choose a reason for hiding this comment

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

Let me check. There were several iteration of switching in between TraitAttribute and custom attribute. It might be a leftovers.

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed. Thanks!

using MongoDB.Driver.Linq.Linq3Implementation;
using MongoDB.Driver.Linq.Linq3Implementation.Translators.ExpressionToExecutableQueryTranslators;
using Xunit;

using MongoDB.TestHelpers.XunitExtensions;using Xunit;
Copy link
Contributor

Choose a reason for hiding this comment

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

They should not be on the same line. (And maybe the first using is not necessary?)

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

Copy link
Contributor

@papafe papafe left a comment

Choose a reason for hiding this comment

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

Overall it looks good, just a small question.

@sanych-sun sanych-sun requested a review from papafe May 20, 2025 17:52
Copy link
Contributor

@papafe papafe left a comment

Choose a reason for hiding this comment

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

LGTM

@sanych-sun sanych-sun merged commit ef4e942 into mongodb:main May 23, 2025
26 of 30 checks passed
@sanych-sun sanych-sun deleted the csharp5592 branch May 23, 2025 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Label to hide PR from generated Release Notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants