Skip to content

Commit

Permalink
Enabling some Distinct tests on Cosmos
Browse files Browse the repository at this point in the history
Resolves #16144
  • Loading branch information
maumar committed Aug 13, 2021
1 parent 5d9ae8d commit 6eda37f
Showing 1 changed file with 13 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Linq;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore.TestModels.Northwind;
using Microsoft.EntityFrameworkCore.TestUtilities;
using Xunit;
Expand Down Expand Up @@ -772,41 +769,41 @@ FROM root c
WHERE (c[""Discriminator""] = ""Employee"")");
}

[ConditionalTheory(Skip = "Issue#16144")]
[ConditionalTheory]
public override async Task Distinct(bool async)
{
await base.Distinct(async);

AssertSql(
@"SELECT c
@"SELECT DISTINCT c
FROM root c
WHERE (c[""Discriminator""] = ""Customer"")");
}

[ConditionalTheory(Skip = "Issue#16144")]
[ConditionalTheory]
public override async Task Distinct_Scalar(bool async)
{
await base.Distinct_Scalar(async);

AssertSql(
@"SELECT c
@"SELECT DISTINCT c[""City""]
FROM root c
WHERE (c[""Discriminator""] = ""Customer"")");
}

[ConditionalTheory(Skip = "Issue#16144")]
[ConditionalTheory]
public override async Task OrderBy_Distinct(bool async)
{
await base.OrderBy_Distinct(async);

// Ordering not preserved by distinct when ordering columns not projected.
AssertSql(
@"SELECT c
@"SELECT DISTINCT c[""City""]
FROM root c
WHERE (c[""Discriminator""] = ""Customer"")");
WHERE (c[""Discriminator""] = ""Customer"")
ORDER BY c[""CustomerID""]");
}

[ConditionalTheory(Skip = "Issue#16144")]
[ConditionalTheory(Skip = "Issue#16156")]
public override async Task Distinct_OrderBy(bool async)
{
await base.Distinct_OrderBy(async);
Expand All @@ -817,7 +814,7 @@ FROM root c
WHERE (c[""Discriminator""] = ""Customer"")");
}

[ConditionalTheory(Skip = "Issue#16144")]
[ConditionalTheory(Skip = "Issue#16156")]
public override async Task Distinct_OrderBy2(bool async)
{
await base.Distinct_OrderBy2(async);
Expand All @@ -828,7 +825,7 @@ FROM root c
WHERE (c[""Discriminator""] = ""Customer"")");
}

[ConditionalTheory(Skip = "Issue#16144")]
[ConditionalTheory(Skip = "Issue#16156")]
public override async Task Distinct_OrderBy3(bool async)
{
await base.Distinct_OrderBy3(async);
Expand All @@ -839,7 +836,7 @@ FROM root c
WHERE (c[""Discriminator""] = ""Customer"")");
}

[ConditionalTheory(Skip = "Issue#16144")]
[ConditionalTheory(Skip = "Issue#16156")]
public override async Task Distinct_Count(bool async)
{
await base.Distinct_Count(async);
Expand All @@ -850,7 +847,7 @@ FROM root c
WHERE (c[""Discriminator""] = ""Customer"")");
}

[ConditionalTheory(Skip = "Issue#16144")]
[ConditionalTheory(Skip = "Issue#16156")]
public override async Task Select_Select_Distinct_Count(bool async)
{
await base.Select_Select_Distinct_Count(async);
Expand Down

0 comments on commit 6eda37f

Please sign in to comment.