Skip to content

Instantly share code, notes, and snippets.

View Brokolis's full-sized avatar

Mantas Klimašauskas Brokolis

View GitHub Profile
@Brokolis
Brokolis / Example.cs
Created February 24, 2023 10:29
Limiting the number of tests executed in parallel in xUnit
using Xunit;
using xUnitLimitedConcurrencyTestFramework;
/* Example usage */
// TODO: change the type name and assembly name to match your use case
[assembly: TestFramework("xUnitLimitedConcurrencyTestFramework.LimitedConcurrencyTestFramework", "xUnitLimitedConcurrencyTestFramework")]
// limit concurrent collections in the whole assembly to MaxParallelThreads
[assembly: LimitConcurrency]