-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Navigation test refactoring - improving structure for scenarios that don't support collections #35709
base: main
Are you sure you want to change the base?
Conversation
…don't support collections Fixes #35707
@@ -40,6 +40,7 @@ public class InMemoryComplianceTest : ComplianceTestBase | |||
typeof(RelationshipsInProjectionQueryTestBase<>), | |||
typeof(EntityRelationshipsIncludeQueryTestBase<>), | |||
typeof(RelationshipsIncludeQueryTestBase<>), | |||
typeof(RelationshipsNoCollectionsInProjectionQueryTestBase<>), |
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.
We should have a better name here, ReferenceRelationships? (also below)
public abstract class RelationshipsNoCollectionsInProjectionQueryTestBase<TFixture>(TFixture fixture) : RelationshipsInProjectionQueryTestBase<TFixture>(fixture) | ||
where TFixture : RelationshipsQueryFixtureBase, new() | ||
{ | ||
public sealed override Task Project_trunk_collection(bool async) |
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.
IMHO this is IMHO the kind of pattern we should be avoiding - it would mean that every time we add a test that exercises collection relationships, we'd have to add an ignore here. Ideally, we'd have a test base class with only reference relationships (which can be extended multiple times - for JSON, for table splitting) and a another one which has tests for collection relationships.
In other words, organize our tests based on what's supported and what isn't; just like we want to separate tests that require navigations, since those can't work on Cosmos and other document databases.
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.
That was my initial approach, but I didn't like the outcome because of test class explosion (essentially doubling the number of classes) - will see if I can make it better.
converting to draft, see #35711 instead |
Plus minor cleanup
Fixes #35707