Skip to content

Commit ed88cd3

Browse files
Copilotrenemadsen
andcommitted
Enable AdHocJsonQueryMySqlTest for MySQL
Made AdHocJsonQueryMySqlTest public and added MariaDB skip condition. This test suite includes ad-hoc JSON query scenarios covering: - JSON entity projections - JSON collections with nested structures - Enum handling in JSON - Missing/null navigations and scalars - Junk data in JSON - IReadOnlyList collections Test results: 22 passing, 8 skipped, 37 failing due to MySQL's stricter JSON validation (rejecting invalid JSON with null: syntax and other malformations that the test expects to handle). Removed AdHocJsonQueryTestBase and AdHocJsonQueryRelationalTestBase from compliance test ignored list. Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
1 parent 6813cad commit ed88cd3

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

test/EFCore.MySql.FunctionalTests/MySqlComplianceTest.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ public class MySqlComplianceTest : RelationalComplianceTestBase
5858
typeof(LoggingRelationalTestBase<,>),
5959

6060
// We have our own JSON support for now
61-
typeof(AdHocJsonQueryTestBase),
62-
typeof(AdHocJsonQueryRelationalTestBase),
61+
// AdHocJsonQueryTestBase and AdHocJsonQueryRelationalTestBase are now enabled (public class)
6362
typeof(JsonQueryRelationalTestBase<>),
6463
typeof(JsonQueryTestBase<>),
6564
typeof(JsonTypesRelationalTestBase),

test/EFCore.MySql.FunctionalTests/Query/AdHocJsonQueryMySqlTest.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,16 @@
88
using MySqlConnector;
99
using Pomelo.EntityFrameworkCore.MySql.Diagnostics.Internal;
1010
using Pomelo.EntityFrameworkCore.MySql.FunctionalTests.TestUtilities;
11+
using Pomelo.EntityFrameworkCore.MySql.Infrastructure;
12+
using Pomelo.EntityFrameworkCore.MySql.Tests.TestUtilities.Attributes;
1113
using Xunit;
1214

1315
namespace Pomelo.EntityFrameworkCore.MySql.FunctionalTests.Query;
1416

15-
// Disabled via internal access. The EF Core 7.0 JSON support isn't currently implemented.
16-
internal class AdHocJsonQueryMySqlTest : AdHocJsonQueryRelationalTestBase
17+
// Re-enabled to test ad-hoc JSON query scenarios
18+
// Skip on MariaDB due to JsonDataTypeEmulation limitations
19+
[SupportedServerVersionLessThanCondition(nameof(ServerVersionSupport.JsonDataTypeEmulation))]
20+
public class AdHocJsonQueryMySqlTest : AdHocJsonQueryRelationalTestBase
1721
{
1822
public AdHocJsonQueryMySqlTest(NonSharedFixture fixture)
1923
: base(fixture)

0 commit comments

Comments
 (0)