add some test fixes

pull/233/head
Christopher Jolly 2 years ago
parent c84a048e23
commit a95891737c

@ -6811,43 +6811,23 @@ WHERE (
public override async Task Parameter_collection_Contains_with_projection_and_ordering(bool async) public override async Task Parameter_collection_Contains_with_projection_and_ordering(bool async)
{ {
#if DEBUG await base.Parameter_collection_Contains_with_projection_and_ordering(async);
// GroupBy debug assert. Issue #26104.
Assert.StartsWith( AssertSql(
"Missing alias in the list", """
(await Assert.ThrowsAsync<InvalidOperationException>( SELECT `t`.`Key`, `t`.`MaxTimestamp`
() => base.Parameter_collection_Contains_with_projection_and_ordering(async))).Message); FROM (
#else SELECT `o`.`Quantity` AS `Key`, (
await base.Parameter_collection_Contains_with_projection_and_ordering(async); SELECT MAX(`o3`.`OrderDate`)
FROM `Order Details` AS `o2`
AssertSql( INNER JOIN `Orders` AS `o3` ON `o2`.`OrderID` = `o3`.`OrderID`
""" WHERE `o2`.`OrderID` IN (10248, 10249) AND `o`.`Quantity` = `o2`.`Quantity`) AS `MaxTimestamp`
@__ids_0='[10248,10249]' (Size = 4000) FROM `Order Details` AS `o`
WHERE `o`.`OrderID` IN (10248, 10249)
SELECT [o].[Quantity] AS [Key], ( GROUP BY `o`.`Quantity`
SELECT MAX([o3].[OrderDate]) ) AS `t`
FROM [Order Details] AS [o2] ORDER BY `t`.`MaxTimestamp`
INNER JOIN [Orders] AS [o3] ON [o2].[OrderID] = [o3].[OrderID] """);
WHERE [o2].[OrderID] IN (
SELECT [i1].[value]
FROM OPENJSON(@__ids_0) WITH ([value] int '$') AS [i1]
) AND [o].[Quantity] = [o2].[Quantity]) AS [MaxTimestamp]
FROM [Order Details] AS [o]
WHERE [o].[OrderID] IN (
SELECT [i].[value]
FROM OPENJSON(@__ids_0) WITH ([value] int '$') AS [i]
)
GROUP BY [o].[Quantity]
ORDER BY (
SELECT MAX([o3].[OrderDate])
FROM [Order Details] AS [o2]
INNER JOIN [Orders] AS [o3] ON [o2].[OrderID] = [o3].[OrderID]
WHERE [o2].[OrderID] IN (
SELECT [i0].[value]
FROM OPENJSON(@__ids_0) WITH ([value] int '$') AS [i0]
) AND [o].[Quantity] = [o2].[Quantity])
""");
#endif
} }
private void AssertSql(params string[] expected) private void AssertSql(params string[] expected)

@ -1262,12 +1262,12 @@ CROSS APPLY (
SelectMany_with_collection_being_correlated_subquery_which_references_non_mapped_properties_from_inner_and_outer_entity( SelectMany_with_collection_being_correlated_subquery_which_references_non_mapped_properties_from_inner_and_outer_entity(
bool isAsync) bool isAsync)
{ {
await base await AssertUnableToTranslateEFProperty(
.SelectMany_with_collection_being_correlated_subquery_which_references_non_mapped_properties_from_inner_and_outer_entity( () => base
isAsync); .SelectMany_with_collection_being_correlated_subquery_which_references_non_mapped_properties_from_inner_and_outer_entity(
isAsync));
AssertSql( AssertSql();
$@"");
} }
public override async Task Select_with_complex_expression_that_can_be_funcletized(bool isAsync) public override async Task Select_with_complex_expression_that_can_be_funcletized(bool isAsync)

Loading…
Cancel
Save