test(secrets): serialize env-var-mutating test classes into one xunit collection
Environment.SetEnvironmentVariable/GetEnvironmentVariable mutate the process-wide environ; concurrent setenv/getenv across parallel xunit test classes is a documented crash/flake source on glibc even with unique variable names. Group the six classes that touch process env vars into a DisableParallelization=true collection so they run serially against each other while everything else keeps running in parallel.
This commit is contained in:
+1
@@ -13,6 +13,7 @@ namespace ZB.MOM.WW.Secrets.Tests.Cli.Interactive;
|
||||
/// KEK-upgrade prompt, and the error-containment panel. The shell is the only UI-owning class, so these
|
||||
/// tests assert on rendered <see cref="TestConsole.Output"/> and on what a fake flow observed.
|
||||
/// </summary>
|
||||
[Collection("Process environment")]
|
||||
public sealed class InteractiveShellTests : IDisposable
|
||||
{
|
||||
private readonly string _dir =
|
||||
|
||||
+1
@@ -11,6 +11,7 @@ namespace ZB.MOM.WW.Secrets.Tests.Cli.Interactive;
|
||||
/// <see cref="IMasterKeyProvider.KekId"/> derived identically to the configured providers so a key
|
||||
/// entered by hand can decrypt (and re-wrap) rows another provider kind sealed.
|
||||
/// </summary>
|
||||
[Collection("Process environment")]
|
||||
public sealed class LiteralMasterKeyProviderTests
|
||||
{
|
||||
private static string NewKeyBase64()
|
||||
|
||||
+1
@@ -13,6 +13,7 @@ namespace ZB.MOM.WW.Secrets.Tests.Cli.Interactive;
|
||||
/// (present/decryptable → Ok, absent → Missing, tombstoned → Tombstoned, wrong-KEK → Undecryptable),
|
||||
/// and the degraded-session presence-only downgrade (present → PresentUnverified).
|
||||
/// </summary>
|
||||
[Collection("Process environment")]
|
||||
public sealed class ReferenceAuditorTests : IDisposable
|
||||
{
|
||||
private readonly string _dir =
|
||||
|
||||
+1
@@ -13,6 +13,7 @@ namespace ZB.MOM.WW.Secrets.Tests.Cli.Interactive;
|
||||
/// (KEK unresolvable → degraded session that still lists metadata), the operator-override upgrade, and
|
||||
/// the SQL-Server-with-unresolved-secret-ref fall-back to the local store.
|
||||
/// </summary>
|
||||
[Collection("Process environment")]
|
||||
public sealed class SecretsSessionFactoryTests : IDisposable
|
||||
{
|
||||
private readonly string _dir =
|
||||
|
||||
Reference in New Issue
Block a user