From 7e1a50231031acbc43d0fdc4e485fc8dc3f22fa2 Mon Sep 17 00:00:00 2001 From: Sluijsens Date: Wed, 11 Nov 2026 00:48:45 +0100 Subject: [PATCH] Tests: DB-pipelinetests serieel (MySql.Data-driver is niet thread-safe bij parallel openen van verbindingen) Co-Authored-By: Claude Sonnet 5.5 --- .../AssemblyBehavior.cs | 6 ++++++ src/SlpModularCms.Modules.Contact.Tests/AssemblyBehavior.cs | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 src/SlpModularCms.Api.AndreaSlopFotografie.Tests/AssemblyBehavior.cs create mode 100644 src/SlpModularCms.Modules.Contact.Tests/AssemblyBehavior.cs diff --git a/src/SlpModularCms.Api.AndreaSlopFotografie.Tests/AssemblyBehavior.cs b/src/SlpModularCms.Api.AndreaSlopFotografie.Tests/AssemblyBehavior.cs new file mode 100644 index 0000000..dce25e9 --- /dev/null +++ b/src/SlpModularCms.Api.AndreaSlopFotografie.Tests/AssemblyBehavior.cs @@ -0,0 +1,6 @@ +// The host tests start several real hosts against MariaDB/MySQL. The MySql.Data driver keeps a static, +// non-thread-safe dictionary that is touched while a connection is opened (MySql.Data.Common.Ssl.StartSSL), so opening +// connections from several hosts at the same time can fail with "Operations that change non-concurrent collections +// must have exclusive access". The suite is small and fast (the pure unit tests take about a second), so the whole +// assembly runs serially instead of guessing which classes touch the driver. +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/SlpModularCms.Modules.Contact.Tests/AssemblyBehavior.cs b/src/SlpModularCms.Modules.Contact.Tests/AssemblyBehavior.cs new file mode 100644 index 0000000..688f14b --- /dev/null +++ b/src/SlpModularCms.Modules.Contact.Tests/AssemblyBehavior.cs @@ -0,0 +1,6 @@ +// The pipeline tests start several real hosts against MariaDB/MySQL. The MySql.Data driver keeps a static, +// non-thread-safe dictionary that is touched while a connection is opened (MySql.Data.Common.Ssl.StartSSL), so opening +// connections from several hosts at the same time can fail with "Operations that change non-concurrent collections +// must have exclusive access". The suite is small and fast (the pure unit tests take about a second), so the whole +// assembly runs serially instead of guessing which classes touch the driver. +[assembly: CollectionBehavior(DisableTestParallelization = true)]