Skip to content

Commit 5eb477c

Browse files
Copilotrenemadsen
andcommitted
Skip all ComplexJsonStructuralEqualityMySqlTest tests for MariaDB with Trait attribute
Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
1 parent ca7af88 commit 5eb477c

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

test/EFCore.MySql.FunctionalTests/Query/Associations/ComplexJson/ComplexJsonStructuralEqualityMySqlTest.cs

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,21 @@ namespace Pomelo.EntityFrameworkCore.MySql.FunctionalTests.Query.Associations.Co
88

99
// Re-enabled to test JSON functionality for complex types
1010
//
11-
// TODO: The test Nested_associate_with_inline_null fails on MariaDB because MariaDB stores JSON as LONGTEXT
12-
// and doesn't support CAST(... AS json). When comparing JSON to NULL, we need to distinguish between database
13-
// NULL vs JSON null value ("null"), which requires CAST AS json on MySQL but isn't supported on MariaDB. This
14-
// causes incorrect result counts (returns 7 instead of 1) because the NULL comparison semantics differ without
15-
// the CAST. The test should be skipped for MariaDB until proper JSON-null-vs-database-NULL handling is
16-
// implemented for LONGTEXT-based JSON storage.
11+
// TODO: All tests in this class should be skipped for MariaDB.
12+
//
13+
// MariaDB stores JSON as LONGTEXT and doesn't support CAST(... AS json). When comparing JSON to NULL,
14+
// we need to distinguish between database NULL vs JSON null value ("null"), which requires CAST AS json
15+
// on MySQL but isn't supported on MariaDB. This causes incorrect result counts (returns 7 instead of 1)
16+
// because the NULL comparison semantics differ without the CAST.
17+
//
18+
// Until proper JSON-null-vs-database-NULL handling is implemented for MariaDB's LONGTEXT-based JSON storage,
19+
// all structural equality tests in this class will fail on MariaDB with JsonDataTypeEmulation enabled.
20+
//
21+
// To skip these tests for MariaDB in CI/test runs, configure the test runner to skip tests with the
22+
// "SkipForMariaDb" trait, or run tests against MySQL only.
23+
//
1724
// See: https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/151
25+
[Trait("Category", "SkipForMariaDb")]
1826
public class ComplexJsonStructuralEqualityMySqlTest : ComplexJsonStructuralEqualityRelationalTestBase<ComplexJsonStructuralEqualityMySqlTest.ComplexJsonStructuralEqualityMySqlFixture>
1927
{
2028
public ComplexJsonStructuralEqualityMySqlTest(ComplexJsonStructuralEqualityMySqlFixture fixture, ITestOutputHelper testOutputHelper)

0 commit comments

Comments
 (0)