diff --git a/src/Microsoft.EntityFrameworkCore.Specification.Tests/QueryTestBase.cs b/src/Microsoft.EntityFrameworkCore.Specification.Tests/QueryTestBase.cs index ac53344f9e5..b294105385d 100644 --- a/src/Microsoft.EntityFrameworkCore.Specification.Tests/QueryTestBase.cs +++ b/src/Microsoft.EntityFrameworkCore.Specification.Tests/QueryTestBase.cs @@ -6598,10 +6598,9 @@ public virtual void OrderBy_skip_take_distinct() .ThenBy(c => c.ContactName) .Skip(5) .Take(15) - .Distinct() - .Take(8), + .Distinct(), assertOrder: false, - entryCount: 8); + entryCount: 15); } [ConditionalFact] diff --git a/test/Microsoft.EntityFrameworkCore.SqlServer.FunctionalTests/QuerySqlServerTest.cs b/test/Microsoft.EntityFrameworkCore.SqlServer.FunctionalTests/QuerySqlServerTest.cs index ed12017a897..7b485dc07ef 100644 --- a/test/Microsoft.EntityFrameworkCore.SqlServer.FunctionalTests/QuerySqlServerTest.cs +++ b/test/Microsoft.EntityFrameworkCore.SqlServer.FunctionalTests/QuerySqlServerTest.cs @@ -6605,11 +6605,10 @@ public override void OrderBy_skip_take_distinct() base.OrderBy_skip_take_distinct(); Assert.Equal( - @"@__p_2: 8 -@__p_0: 5 + @"@__p_0: 5 @__p_1: 15 -SELECT DISTINCT TOP(@__p_2) [t].* +SELECT DISTINCT [t].* FROM ( SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] diff --git a/test/Microsoft.EntityFrameworkCore.SqlServer.FunctionalTests/RowNumberPagingTest.cs b/test/Microsoft.EntityFrameworkCore.SqlServer.FunctionalTests/RowNumberPagingTest.cs index 1d65adc293f..aa12158eb52 100644 --- a/test/Microsoft.EntityFrameworkCore.SqlServer.FunctionalTests/RowNumberPagingTest.cs +++ b/test/Microsoft.EntityFrameworkCore.SqlServer.FunctionalTests/RowNumberPagingTest.cs @@ -298,11 +298,10 @@ public override void OrderBy_skip_take_distinct() base.OrderBy_skip_take_distinct(); Assert.Equal( - @"@__p_2: 8 -@__p_0: 5 + @"@__p_0: 5 @__p_1: 15 -SELECT DISTINCT TOP(@__p_2) [t].* +SELECT DISTINCT [t].* FROM ( SELECT [t0].[CustomerID], [t0].[Address], [t0].[City], [t0].[CompanyName], [t0].[ContactName], [t0].[ContactTitle], [t0].[Country], [t0].[Fax], [t0].[Phone], [t0].[PostalCode], [t0].[Region] FROM ( diff --git a/test/Microsoft.EntityFrameworkCore.Tests/ModelBuilderTest/OneToOneTestBase.cs b/test/Microsoft.EntityFrameworkCore.Tests/ModelBuilderTest/OneToOneTestBase.cs index 9a4f5666b67..936b2dddb96 100644 --- a/test/Microsoft.EntityFrameworkCore.Tests/ModelBuilderTest/OneToOneTestBase.cs +++ b/test/Microsoft.EntityFrameworkCore.Tests/ModelBuilderTest/OneToOneTestBase.cs @@ -6,6 +6,7 @@ using Microsoft.EntityFrameworkCore.Internal; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Metadata.Internal; +using Microsoft.EntityFrameworkCore.Specification.Tests.TestUtilities.Xunit; using Xunit; // ReSharper disable once CheckNamespace @@ -3641,7 +3642,7 @@ public virtual void Creates_one_to_one_relationship_with_single_ref_as_principal Assert.Equal(OneToOnePrincipalEntity.EntityMatchingProperty.Name, fk.Properties.Single().Name); } - [Fact] // Issue #3376 + [ConditionalFact(Skip = "Test is flaky due to concurrency issue.")] //TODO: Issue#7531 public virtual void Can_use_self_referencing_overlapping_FK_PK() { var modelBuilder = CreateModelBuilder();