From bd634bbe1c6e9231b04ad4c1c0c2b22fc5161021 Mon Sep 17 00:00:00 2001 From: Shay Rojansky Date: Mon, 22 Jul 2019 20:20:12 +0200 Subject: [PATCH] Make some tests deterministic --- .../Query/ComplexNavigationsQueryTestBase.cs | 6 ++++-- .../Query/GroupByQueryTestBase.cs | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/test/EFCore.Specification.Tests/Query/ComplexNavigationsQueryTestBase.cs b/test/EFCore.Specification.Tests/Query/ComplexNavigationsQueryTestBase.cs index 39e69dfb02f..aff1f926bbb 100644 --- a/test/EFCore.Specification.Tests/Query/ComplexNavigationsQueryTestBase.cs +++ b/test/EFCore.Specification.Tests/Query/ComplexNavigationsQueryTestBase.cs @@ -5796,7 +5796,8 @@ public virtual Task Include13(bool isAsync) { x => x.one, x => x.two - }); + }, + elementSorter: e => e.one.Id); } [ConditionalTheory] @@ -5820,7 +5821,8 @@ public virtual Task Include14(bool isAsync) x => x.one, // issue #15368 //x => x.two, - }); + }, + elementSorter: e => e.one.Id); } [ConditionalFact] diff --git a/test/EFCore.Specification.Tests/Query/GroupByQueryTestBase.cs b/test/EFCore.Specification.Tests/Query/GroupByQueryTestBase.cs index 75b9eb4dea6..ae809089c53 100644 --- a/test/EFCore.Specification.Tests/Query/GroupByQueryTestBase.cs +++ b/test/EFCore.Specification.Tests/Query/GroupByQueryTestBase.cs @@ -275,7 +275,7 @@ public virtual Task GroupBy_aggregate_projecting_conditional_expression_based_on Key = g.Key == null ? "is null" : "is not null", Sum = g.Sum(o => o.OrderID) }), - e => e.Key); + e => e.Sum); } #endregion