Files
mxaccessgw/src/MxGateway.IntegrationTests/LiveResourcesCollection.cs
T
Joseph Doherty b4f5e8eb48 Resolve IntegrationTests-007..010 code-review findings
IntegrationTests-007: the three live test classes contend for shared
singletons (one MXAccess COM, one ZB SQL DB, one GLAuth). Added
LiveResourcesCollection with DisableParallelization and applied it to all
three so they no longer run concurrently.

IntegrationTests-008: the three live fact attributes each re-implemented the
env-var check. Added IntegrationTestEnvironment.IsEnabled and all three now
delegate to it.

IntegrationTests-009: reworded the misleading "Mock server call context" XML
doc — it is a hand-written stub with no verification behavior.

IntegrationTests-010: WaitForMessageAsync ignored cancellation. It now takes
an optional CancellationToken linked with the timeout; the smoke test shares
one cancellation source with the StreamEvents call context.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 22:59:18 -04:00

17 lines
802 B
C#

namespace MxGateway.IntegrationTests;
/// <summary>
/// xUnit collection that serializes every live integration-test class. The live
/// suites contend for genuinely shared singletons — one MXAccess COM provider,
/// one <c>ZB</c> SQL database, and one GLAuth instance with a per-IP failure
/// lockout — so they must not run in parallel with one another. Placing each
/// live class in this collection disables xUnit's default cross-class
/// parallelism for them while leaving non-live tests free to parallelize.
/// </summary>
[CollectionDefinition(Name, DisableParallelization = true)]
public sealed class LiveResourcesCollection
{
/// <summary>The collection name applied via <c>[Collection]</c> on live test classes.</summary>
public const string Name = "Live external resources";
}