Skip to content

Commit

Permalink
Fix some non-determinism in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
roji committed Oct 31, 2019
1 parent 431b78c commit fb8fc9e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ public virtual Task GroupBy_aggregate_projecting_conditional_expression(bool isA
ss => ss.Set<Order>().GroupBy(o => o.OrderDate).Select(
g =>
new { g.Key, SomeValue = g.Count() == 0 ? 1 : g.Sum(o => o.OrderID % 2 == 0 ? 1 : 0) / g.Count() }),
e => e.SomeValue);
e => (e.Key, e.SomeValue));
}

[ConditionalTheory]
Expand Down Expand Up @@ -1948,8 +1948,10 @@ public virtual Task GroupBy_with_order_by_skip_and_another_order_by(bool isAsync
isAsync,
ss => ss.Set<Order>()
.OrderBy(o => o.CustomerID)
.ThenBy(o => o.OrderID)
.Skip(80)
.OrderBy(o => o.CustomerID)
.ThenBy(o => o.OrderID)
.GroupBy(o => o.CustomerID)
.Select(g => g.Sum(o => o.OrderID))
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2110,7 +2110,7 @@ SELECT SUM([t].[OrderID])
FROM (
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
FROM [Orders] AS [o]
ORDER BY [o].[CustomerID]
ORDER BY [o].[CustomerID], [o].[OrderID]
OFFSET @__p_0 ROWS
) AS [t]
GROUP BY [t].[CustomerID]");
Expand Down

0 comments on commit fb8fc9e

Please sign in to comment.