Skip to content

Commit

Permalink
Re-enable fixed tests (#33871)
Browse files Browse the repository at this point in the history
* Re-enable `Json_collection_of_primitives_SelectMany`

Fixed by #31369.

* Re-enable `Column_collection_inside_json_owned_entity`
  • Loading branch information
ranma42 authored Jun 2, 2024
1 parent 749f4a9 commit 510243d
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1437,7 +1437,7 @@ public virtual Task Json_nested_collection_SelectMany(bool async)
.AsNoTracking(),
elementSorter: e => (e.Enum, e.Date, e.NullableEnum, e.Fraction));

[ConditionalTheory(Skip = "issue #31364")]
[ConditionalTheory]
[MemberData(nameof(IsAsyncData))]
public virtual Task Json_collection_of_primitives_SelectMany(bool async)
=> AssertQuery(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public abstract class NonSharedPrimitiveCollectionsQueryRelationalTestBase : Non
public override Task Array_of_byte()
=> AssertTranslationFailed(() => TestArray((byte)1, (byte)2));

[ConditionalFact(Skip = "#28688")]
[ConditionalFact]
public virtual async Task Column_collection_inside_json_owned_entity()
{
var contextFactory = await InitializeAsync<TestContext>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1468,7 +1468,12 @@ public override async Task Json_collection_of_primitives_SelectMany(bool async)
{
await base.Json_collection_of_primitives_SelectMany(async);

AssertSql("");
AssertSql(
"""
SELECT [n].[value]
FROM [JsonEntitiesBasic] AS [j]
CROSS APPLY OPENJSON(JSON_QUERY([j].[OwnedReferenceRoot], '$.Names')) WITH ([value] nvarchar(max) '$') AS [n]
""");
}

public override async Task Json_collection_of_primitives_index_used_in_predicate(bool async)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -758,13 +758,13 @@ SELECT TOP(2) [t].[Id], [t].[Owned]
FROM [TestOwner] AS [t]
WHERE (
SELECT COUNT(*)
FROM OPENJSON(JSON_VALUE([t].[Owned], '$.Strings')) AS [s]) = 2
FROM OPENJSON(JSON_QUERY([t].[Owned], '$.Strings')) AS [s]) = 2
""",
//
"""
SELECT TOP(2) [t].[Id], [t].[Owned]
FROM [TestOwner] AS [t]
WHERE JSON_VALUE(JSON_VALUE([t].[Owned], '$.Strings'), '$[1]') = N'bar'
WHERE JSON_VALUE([t].[Owned], '$.Strings[1]') = N'bar'
""");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,13 @@ public override async Task Json_nested_collection_SelectMany(bool async)
() => base.Json_nested_collection_SelectMany(async)))
.Message);

public override async Task Json_collection_of_primitives_SelectMany(bool async)
=> Assert.Equal(
SqliteStrings.ApplyNotSupported,
(await Assert.ThrowsAsync<InvalidOperationException>(
() => base.Json_collection_of_primitives_SelectMany(async)))
.Message);

public override async Task Json_collection_index_in_projection_using_untranslatable_client_method(bool async)
{
var message = (await Assert.ThrowsAsync<InvalidOperationException>(
Expand Down

0 comments on commit 510243d

Please sign in to comment.