Skip to content

Commit

Permalink
Need to await for the semaphore to be effective
Browse files Browse the repository at this point in the history
  • Loading branch information
bradwilson committed Apr 18, 2024
1 parent 0cdf854 commit 334ad7f
Showing 1 changed file with 2 additions and 3 deletions.
Expand Up @@ -265,14 +265,13 @@ protected override async Task<RunSummary> RunTestCollectionsAsync(IMessageBus me
}

/// <inheritdoc/>
protected override Task<RunSummary> RunTestCollectionAsync(IMessageBus messageBus, ITestCollection testCollection, IEnumerable<IXunitTestCase> testCases, CancellationTokenSource cancellationTokenSource)
protected override async Task<RunSummary> RunTestCollectionAsync(IMessageBus messageBus, ITestCollection testCollection, IEnumerable<IXunitTestCase> testCases, CancellationTokenSource cancellationTokenSource)
{

parallelSemaphore?.Wait();

try
{
return new XunitTestCollectionRunner(testCollection, testCases, DiagnosticMessageSink, messageBus, TestCaseOrderer, new ExceptionAggregator(Aggregator), cancellationTokenSource).RunAsync();
return await new XunitTestCollectionRunner(testCollection, testCases, DiagnosticMessageSink, messageBus, TestCaseOrderer, new ExceptionAggregator(Aggregator), cancellationTokenSource).RunAsync();
}
finally
{
Expand Down

0 comments on commit 334ad7f

Please sign in to comment.