From 68263d201dc2d4b1288b5d1faa38a636f05b59c0 Mon Sep 17 00:00:00 2001 From: AnalogFeelings <51166756+AnalogFeelings@users.noreply.github.com> Date: Thu, 8 Feb 2024 19:21:25 +0100 Subject: [PATCH] [Tests -> Components] Fix queue test. --- Source/SammBot.Tests/Components/TaskQueueTests.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/SammBot.Tests/Components/TaskQueueTests.cs b/Source/SammBot.Tests/Components/TaskQueueTests.cs index d6db2c8..1a45140 100644 --- a/Source/SammBot.Tests/Components/TaskQueueTests.cs +++ b/Source/SammBot.Tests/Components/TaskQueueTests.cs @@ -45,7 +45,9 @@ public async Task ConcurrencyTest() Task finishedTask = await Task.WhenAny(firstEnqueue, secondEnqueue, thirdEnqueue); - Assert.IsTrue(finishedTask == firstEnqueue, $"Second task finished before the first at attempt {i}."); + Assert.IsTrue(finishedTask == firstEnqueue, $"Secondary task finished before the first at attempt {i}."); + + Task.WaitAll(firstEnqueue, secondEnqueue, thirdEnqueue); } } } \ No newline at end of file