diff --git a/src/Foundatio.TestHarness/Jobs/JobQueueTestsBase.cs b/src/Foundatio.TestHarness/Jobs/JobQueueTestsBase.cs index 1c249a04..bddbaf6c 100644 --- a/src/Foundatio.TestHarness/Jobs/JobQueueTestsBase.cs +++ b/src/Foundatio.TestHarness/Jobs/JobQueueTestsBase.cs @@ -146,7 +146,7 @@ await Run.InParallelAsync(jobCount, async index => { var queue = queues[index - 1]; var job = new SampleQueueWithRandomErrorsAndAbandonsJob(queue, metrics, Log); await job.RunUntilEmptyAsync(cancellationTokenSource.Token); - cancellationTokenSource.Cancel(); + await cancellationTokenSource.CancelAsync(); }); _logger.LogInformation("Done running jobs until empty");