Skip to content

Commit

Permalink
Test: Update a test which was giving non-deterministic results
Browse files Browse the repository at this point in the history
  • Loading branch information
smitpatel committed Feb 2, 2017
1 parent d1ff79b commit 039f6a6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 039f6a6

Please sign in to comment.