diff --git a/src/Directory.Build.props b/src/Directory.Build.props index dc3a0e0..edf7f10 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -5,7 +5,7 @@ $(PackageId) - This library provides various compatibility features between `NUnit` and `XUnit`. + This library provides various compatibility features between `NUnit`, `XUnit` and `MSTest`. 2023 diff --git a/src/NetEvolve.Extensions.NUnit/MaxLevelOfParallelismAttribute.cs b/src/NetEvolve.Extensions.NUnit/MaxLevelOfParallelismAttribute.cs index cc1012c..acdccfe 100644 --- a/src/NetEvolve.Extensions.NUnit/MaxLevelOfParallelismAttribute.cs +++ b/src/NetEvolve.Extensions.NUnit/MaxLevelOfParallelismAttribute.cs @@ -22,13 +22,5 @@ public sealed class MaxLevelOfParallelismAttribute : PropertyAttribute /// /// The number of worker threads to be created by the framework. public MaxLevelOfParallelismAttribute(int level) - : this(level, Environment.ProcessorCount - 1) { } - - /// - /// Construct a . - /// - /// The number of worker threads to be created by the framework. - /// The number of workers, which should be used alternatively. - public MaxLevelOfParallelismAttribute(int level, int alternativeLevel) - : base("LevelOfParallelism", Math.Min(level, alternativeLevel)) { } + : base("LevelOfParallelism", Math.Min(level, (int)(Environment.ProcessorCount * .75))) { } } diff --git a/tests/NetEvolve.Extensions.NUnit.Tests.Unit/AssemblyAttributes.cs b/tests/NetEvolve.Extensions.NUnit.Tests.Unit/AssemblyAttributes.cs new file mode 100644 index 0000000..718a522 --- /dev/null +++ b/tests/NetEvolve.Extensions.NUnit.Tests.Unit/AssemblyAttributes.cs @@ -0,0 +1,3 @@ +using NetEvolve.Extensions.NUnit; + +[assembly: MaxLevelOfParallelism(12)]