diff --git a/test/EFCore.InMemory.FunctionalTests/Query/Ef6GroupByInMemoryTest.cs b/test/EFCore.InMemory.FunctionalTests/Query/Ef6GroupByInMemoryTest.cs index fa6c6cec4df..d88e1c0b6ca 100644 --- a/test/EFCore.InMemory.FunctionalTests/Query/Ef6GroupByInMemoryTest.cs +++ b/test/EFCore.InMemory.FunctionalTests/Query/Ef6GroupByInMemoryTest.cs @@ -16,7 +16,8 @@ public override Task Average_Grouped_from_LINQ_101(bool async) ss => from p in ss.Set() group p by p.Category into g - select new { Category = g.Key, AveragePrice = g.Average(p => p.UnitPrice) }); + select new { Category = g.Key, AveragePrice = g.Average(p => p.UnitPrice) }, + elementSorter: e => (e.Category, e.AveragePrice)); public class Ef6GroupByInMemoryFixture : Ef6GroupByFixtureBase { diff --git a/test/EFCore.Specification.Tests/Query/Ef6GroupByTestBase.cs b/test/EFCore.Specification.Tests/Query/Ef6GroupByTestBase.cs index 46987ca8e17..fe48a09a953 100644 --- a/test/EFCore.Specification.Tests/Query/Ef6GroupByTestBase.cs +++ b/test/EFCore.Specification.Tests/Query/Ef6GroupByTestBase.cs @@ -413,7 +413,8 @@ into g ss => from p in ss.Set() group p by p.Category into g - select new { Category = g.Key, AveragePrice = Math.Round(g.Average(p => p.UnitPrice) - 0.0000005m, 6) }); + select new { Category = g.Key, AveragePrice = Math.Round(g.Average(p => p.UnitPrice) - 0.0000005m, 6) }, + elementSorter: e => (e.Category, e.AveragePrice)); [ConditionalTheory] [MemberData(nameof(IsAsyncData))] diff --git a/test/EFCore.Specification.Tests/Query/NorthwindSelectQueryTestBase.cs b/test/EFCore.Specification.Tests/Query/NorthwindSelectQueryTestBase.cs index b219f7b62bc..638ac978283 100644 --- a/test/EFCore.Specification.Tests/Query/NorthwindSelectQueryTestBase.cs +++ b/test/EFCore.Specification.Tests/Query/NorthwindSelectQueryTestBase.cs @@ -846,7 +846,7 @@ public virtual Task Reverse_in_subquery_via_pushdown(bool async) .Take(5) .Distinct() .Select(e => new { e.EmployeeID, e.City }), - assertOrder: true); + elementSorter: e => e.EmployeeID); [ConditionalTheory] [MemberData(nameof(IsAsyncData))]