Skip to content

Commit d73cdef

Browse files
committed
Should not try to use a semaphore when we've been asked for unlimited threads
1 parent 3722e54 commit d73cdef

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/xunit.execution/Sdk/Frameworks/Runners/XunitTestAssemblyRunner.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,9 @@ protected override async Task<RunSummary> RunTestCollectionsAsync(IMessageBus me
267267

268268
private void SetupParallelSemaphore(int maxParallelThreads)
269269
{
270+
if (maxParallelThreads < 1)
271+
return;
272+
270273
parallelSemaphore = new SemaphoreSlim(maxParallelThreads);
271274

272275
#if NETSTANDARD

0 commit comments

Comments
 (0)