[CSHARP-4358] Update tests that only test against LINQ2 to test against LINQ3 instead of or in addition to LINQ2 Created: 11/Oct/22  Updated: 14/Dec/22  Resolved: 14/Dec/22

Status: Closed
Project: C# Driver
Component/s: LINQ3, Testing
Affects Version/s: None
Fix Version/s: 2.19.0

Type: Improvement Priority: Unknown
Reporter: Robert Stam Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on CSHARP-4368 Support Convert to BsonValue in LINQ3 Closed
depends on CSHARP-4369 Incorrect translation of Group/Where/... Closed
depends on CSHARP-4401 Test full support for enums in filters Closed
depends on CSHARP-4427 LINQ3 is not throwing on all variatio... Closed
depends on CSHARP-4428 LINQ3 not handling down cast in Updat... Closed
depends on CSHARP-4410 Test full support for enums in aggreg... Closed
Related
related to CSHARP-4331 Make LINQ3 the default LinqProvider Closed

 Description   

As part of CSHARP-4331 when LINQ3 becomes the default LINQ provider a number of tests fail because they were assuming LINQ2 was the default. Typically this is because they are asserting against the translation (e.g. filter or pipeline) as returned by LINQ2 when the LINQ3 translation is slightly different, though also correct.

Note that all the tests in the Linq2ImplementationTests folder should ONLY run against LINQ2 because these tests are by their very nature LINQ2 specific. Every test in the Linq2ImplementationTest folder has a matching test in the Linq3ImplementationTests folder that tests the same test case against LINQ3.

But there are a modest number of tests outside the LINQ test folders that were also LINQ2 specific. In CSHARP-4331 we made these tests pass by explicitly specifying LINQ2 as the LINQ provider (which makes the test pass because it is now explicitly running against LINQ2 instead of simply by default). These are the tests that should be analyzed to see if the should be refactored to run against both LINQ providers or perhaps run only against LINQ3 (suitably refactored so they pass again).



 Comments   
Comment by Githook User [ 14/Dec/22 ]

Author:

{'name': 'rstam', 'email': 'robert@robertstam.org', 'username': 'rstam'}

Message: CSHARP-4358: Update tests that only test against LINQ2 to test against LINQ3 instead of or in addition to LINQ2.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/5ebe18f1d498347f8f69578c9ca33b881fe57399

Comment by Robert Stam [ 12/Oct/22 ]

There are 3 tests that aren't passing with LINQ3 as the default. See tests that fail on this branch:

https://github.com/rstam/mongo-csharp-driver/tree/csharp4358

 

Generated at Wed Feb 07 21:47:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.