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 0929120 commit 57d8d75
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/EFCore.Specification.Tests/Query/GroupByQueryTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,7 @@ public virtual Task GroupBy_aggregate_projecting_conditional_expression(bool isA
isAsync,
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);
new { g.Key, SomeValue = g.Count() == 0 ? 1 : g.Sum(o => o.OrderID % 2 == 0 ? 1 : 0) / g.Count() }));
}

[ConditionalTheory]
Expand Down Expand Up @@ -1948,8 +1947,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

0 comments on commit 57d8d75

Please sign in to comment.