Skip to content

Commit 331023a

Browse files
committed
Serialise ConsoleUtilitySpecs with the process-global-state collection
Fixes a race with PromptConfirmationGlyphSpecs: both mutate the shared static ConsoleUtility.ConsoleWrapper/IsInterrupted, but only the glyph specs opted into ProcessGlobalStateCollection. xUnit runs different collections in parallel, so the two classes intermittently stomped on each other's console wrapper, surfacing as a FakeConsole.LastLine 'Sequence contains no matching element' failure in CI.
1 parent 25e7ed6 commit 331023a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

tests/Fallout.Build.Specs/Utilities/ConsoleUtilitySpecs.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using Fallout.Common.Specs;
12
using Fallout.Common.Utilities;
23
using Xunit;
34
using System;
@@ -8,6 +9,7 @@
89

910
namespace Fallout.Build.Tests.Utilities;
1011

12+
[Collection(ProcessGlobalStateCollection.Name)]
1113
public class ConsoleUtilitySpecs
1214
{
1315
private class MockConsole : IConsole

0 commit comments

Comments
 (0)