Skip to content

Commit a331fb5

Browse files
authored
Make MinBy over subquery test deterministic (#39718)
Fixes #39613
1 parent a585867 commit a331fb5

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

‎test/EFCore.Specification.Tests/Query/NorthwindAggregateOperatorsQueryTestBase.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ public virtual Task MinBy_with_coalesce(bool async)
500500
public virtual Task MinBy_over_subquery(bool async)
501501
=> AssertMinBy(
502502
async,
503-
ss => ss.Set<Customer>(),
503+
ss => ss.Set<Customer>().Where(c => c.CustomerID == "FISSA" || c.CustomerID == "CENTC"),
504504
selector: c => c.Orders.Sum(o => o.OrderID));
505505

506506
[Theory, MemberData(nameof(IsAsyncData))]

‎test/EFCore.SqlServer.FunctionalTests/Query/NorthwindAggregateOperatorsQuerySqlServerTest.cs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,7 @@ public override async Task MinBy_over_subquery(bool async)
444444
"""
445445
SELECT TOP(1) [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
446446
FROM [Customers] AS [c]
447+
WHERE [c].[CustomerID] IN (N'FISSA', N'CENTC')
447448
ORDER BY (
448449
SELECT ISNULL(SUM([o].[OrderID]), 0)
449450
FROM [Orders] AS [o]

0 commit comments

Comments
 (0)