Skip to content

Commit 4f8ea72

Browse files
committed
Comment out tests that no longer compile
Because of the new .NET Contains overload with an optional parameter, which is incompatible with LINQ expression trees. See dotnet#35547
1 parent 50534e1 commit 4f8ea72

23 files changed

+1706
-1541
lines changed

test/EFCore.Cosmos.FunctionalTests/Query/NorthwindAggregateOperatorsQueryCosmosTest.cs

+45-38
Original file line numberDiff line numberDiff line change
@@ -1442,29 +1442,32 @@ WHERE ARRAY_CONTAINS(@ids, c["EmployeeID"])
14421442
""");
14431443
});
14441444

1445-
public override Task Contains_with_local_nullable_uint_array_closure(bool async)
1446-
=> Fixture.NoSyncTest(
1447-
async, async a =>
1448-
{
1449-
await base.Contains_with_local_nullable_uint_array_closure(a);
1450-
1451-
AssertSql(
1452-
"""
1453-
@ids='[0,1]'
1454-
1455-
SELECT VALUE c
1456-
FROM root c
1457-
WHERE ARRAY_CONTAINS(@ids, c["EmployeeID"])
1458-
""",
1459-
//
1460-
"""
1461-
@ids='[0]'
1462-
1463-
SELECT VALUE c
1464-
FROM root c
1465-
WHERE ARRAY_CONTAINS(@ids, c["EmployeeID"])
1466-
""");
1467-
});
1445+
// TODO: The base implementations no longer compile since https://github.com/dotnet/runtime/pull/110197 (Contains overload added with
1446+
// optional parameter, not supported in expression trees). #35547 is tracking on the EF side.
1447+
//
1448+
// public override Task Contains_with_local_nullable_uint_array_closure(bool async)
1449+
// => Fixture.NoSyncTest(
1450+
// async, async a =>
1451+
// {
1452+
// await base.Contains_with_local_nullable_uint_array_closure(a);
1453+
//
1454+
// AssertSql(
1455+
// """
1456+
// @ids='[0,1]'
1457+
//
1458+
// SELECT VALUE c
1459+
// FROM root c
1460+
// WHERE ARRAY_CONTAINS(@ids, c["EmployeeID"])
1461+
// """,
1462+
// //
1463+
// """
1464+
// @ids='[0]'
1465+
//
1466+
// SELECT VALUE c
1467+
// FROM root c
1468+
// WHERE ARRAY_CONTAINS(@ids, c["EmployeeID"])
1469+
// """);
1470+
// });
14681471

14691472
public override Task Contains_with_local_array_inline(bool async)
14701473
=> Fixture.NoSyncTest(
@@ -2004,21 +2007,25 @@ FROM root c
20042007
}
20052008
}
20062009

2007-
public override async Task Contains_with_local_tuple_array_closure(bool async)
2008-
{
2009-
// Contains over subquery. Issue #17246.
2010-
await AssertTranslationFailed(() => base.Contains_with_local_tuple_array_closure(async));
2011-
2012-
AssertSql();
2013-
}
2014-
2015-
public override async Task Contains_with_local_anonymous_type_array_closure(bool async)
2016-
{
2017-
// Contains over subquery. Issue #17246.
2018-
await AssertTranslationFailed(() => base.Contains_with_local_anonymous_type_array_closure(async));
2019-
2020-
AssertSql();
2021-
}
2010+
// TODO: The base implementations no longer compile since https://github.com/dotnet/runtime/pull/110197 (Contains overload added with
2011+
// optional parameter, not supported in expression trees). #35547 is tracking on the EF side.
2012+
//
2013+
//
2014+
// public override async Task Contains_with_local_tuple_array_closure(bool async)
2015+
// {
2016+
// // Contains over subquery. Issue #17246.
2017+
// await AssertTranslationFailed(() => base.Contains_with_local_tuple_array_closure(async));
2018+
//
2019+
// AssertSql();
2020+
// }
2021+
//
2022+
// public override async Task Contains_with_local_anonymous_type_array_closure(bool async)
2023+
// {
2024+
// // Contains over subquery. Issue #17246.
2025+
// await AssertTranslationFailed(() => base.Contains_with_local_anonymous_type_array_closure(async));
2026+
//
2027+
// AssertSql();
2028+
// }
20222029

20232030
public override async Task OfType_Select(bool async)
20242031
{

test/EFCore.Cosmos.FunctionalTests/Query/NorthwindWhereQueryCosmosTest.cs

+28-22
Original file line numberDiff line numberDiff line change
@@ -1627,13 +1627,16 @@ public override async Task Where_collection_navigation_ToArray_Count(bool async)
16271627
AssertSql();
16281628
}
16291629

1630-
public override async Task Where_collection_navigation_ToArray_Contains(bool async)
1631-
{
1632-
// Cosmos client evaluation. Issue #17246.
1633-
await AssertTranslationFailed(() => base.Where_collection_navigation_ToArray_Contains(async));
1634-
1635-
AssertSql();
1636-
}
1630+
// TODO: The base implementations no longer compile since https://github.com/dotnet/runtime/pull/110197 (Contains overload added with
1631+
// optional parameter, not supported in expression trees). #35547 is tracking on the EF side.
1632+
//
1633+
// public override async Task Where_collection_navigation_ToArray_Contains(bool async)
1634+
// {
1635+
// // Cosmos client evaluation. Issue #17246.
1636+
// await AssertTranslationFailed(() => base.Where_collection_navigation_ToArray_Contains(async));
1637+
//
1638+
// AssertSql();
1639+
// }
16371640

16381641
public override async Task Where_collection_navigation_AsEnumerable_Count(bool async)
16391642
{
@@ -1691,21 +1694,24 @@ FROM root c
16911694
""");
16921695
});
16931696

1694-
public override Task Where_array_of_object_contains_over_value_type(bool async)
1695-
=> Fixture.NoSyncTest(
1696-
async, async a =>
1697-
{
1698-
await base.Where_array_of_object_contains_over_value_type(a);
1699-
1700-
AssertSql(
1701-
"""
1702-
@orderIds='[10248,10249]'
1703-
1704-
SELECT VALUE c
1705-
FROM root c
1706-
WHERE ((c["$type"] = "Order") AND ARRAY_CONTAINS(@orderIds, c["OrderID"]))
1707-
""");
1708-
});
1697+
// TODO: The base implementations no longer compile since https://github.com/dotnet/runtime/pull/110197 (Contains overload added with
1698+
// optional parameter, not supported in expression trees). #35547 is tracking on the EF side.
1699+
//
1700+
// public override Task Where_array_of_object_contains_over_value_type(bool async)
1701+
// => Fixture.NoSyncTest(
1702+
// async, async a =>
1703+
// {
1704+
// await base.Where_array_of_object_contains_over_value_type(a);
1705+
//
1706+
// AssertSql(
1707+
// """
1708+
// @orderIds='[10248,10249]'
1709+
//
1710+
// SELECT VALUE c
1711+
// FROM root c
1712+
// WHERE ((c["$type"] = "Order") AND ARRAY_CONTAINS(@orderIds, c["OrderID"]))
1713+
// """);
1714+
// });
17091715

17101716
public override Task Filter_with_EF_Property_using_closure_for_property_name(bool async)
17111717
=> Fixture.NoSyncTest(

0 commit comments

Comments
 (0)