From a8baf02d6abf036ffab7c5a5db3cc02cadbd4184 Mon Sep 17 00:00:00 2001 From: Kevin Zehrer <103638980+kzdev-net@users.noreply.github.com> Date: Thu, 2 Jan 2025 20:28:15 -0600 Subject: [PATCH] Increase timeout in tests and review redundant JSON changes Updated `incrementTestDoneSignal.Wait` timeout from 5s to 10s in `UsingInterlockedOps.cs` to ensure tests have sufficient time to complete. Reviewed `xunit.runner.json` for redundant changes to `parallelizeTestCollections` property, which remains set to `true`. --- .../KZDev.PerfUtils.Common.UnitTests/xunit.runner.json | 2 +- .../UsingInterlockedOps`.cs | 8 ++++---- .../xunit.runner.json | 2 +- .../xunit.runner.json | 2 +- .../xunit.runner.json | 2 +- .../KZDev.PerfUtils.Memory.UnitTests/xunit.runner.json | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Source/Tst/KZDev.PerfUtils.Common.UnitTests/xunit.runner.json b/Source/Tst/KZDev.PerfUtils.Common.UnitTests/xunit.runner.json index 1d2a02c..455ab8e 100644 --- a/Source/Tst/KZDev.PerfUtils.Common.UnitTests/xunit.runner.json +++ b/Source/Tst/KZDev.PerfUtils.Common.UnitTests/xunit.runner.json @@ -1,5 +1,5 @@ { "$schema": "https://xunit.net/schema/current/xunit.runner.schema.json", "parallelizeAssembly": true, - "parallelizeTestCollections" : true, + "parallelizeTestCollections" : true } \ No newline at end of file diff --git a/Source/Tst/KZDev.PerfUtils.Concurrency.UnitTests/UsingInterlockedOps`.cs b/Source/Tst/KZDev.PerfUtils.Concurrency.UnitTests/UsingInterlockedOps`.cs index 21446e5..b3d0759 100644 --- a/Source/Tst/KZDev.PerfUtils.Concurrency.UnitTests/UsingInterlockedOps`.cs +++ b/Source/Tst/KZDev.PerfUtils.Concurrency.UnitTests/UsingInterlockedOps`.cs @@ -94,7 +94,7 @@ private void UsingInterlockedOps_IntegerOperation_WithContention_SavesProperResu // Signal the increment thread to run runIncrementSignal.Set(); // Wait for the increment thread to finish - incrementTestDoneSignal.Wait(5000).Should().BeTrue(); + incrementTestDoneSignal.Wait(10_000).Should().BeTrue(); if (exceptionDispatchInfo is not null) { TestWriteLine($"Exception found on loop #{loop}"); @@ -281,7 +281,7 @@ private void UsingInterlockedOps_UnsignedIntegerOperation_WithContention_SavesPr // Signal the increment thread to run runIncrementSignal.Set(); // Wait for the increment thread to finish - incrementTestDoneSignal.Wait(5000).Should().BeTrue(); + incrementTestDoneSignal.Wait(10_000).Should().BeTrue(); if (exceptionDispatchInfo is not null) { TestWriteLine($"Exception found on loop #{loop}"); @@ -468,7 +468,7 @@ private void UsingInterlockedOps_LongIntegerOperation_WithContention_SavesProper // Signal the increment thread to run runIncrementSignal.Set(); // Wait for the increment thread to finish - incrementTestDoneSignal.Wait(5000).Should().BeTrue(); + incrementTestDoneSignal.Wait(10_000).Should().BeTrue(); if (exceptionDispatchInfo is not null) { TestWriteLine($"Exception found on loop #{loop}"); @@ -649,7 +649,7 @@ private void UsingInterlockedOps_UnsignedLongIntegerOperation_WithContention_Sav // Signal the increment thread to run runIncrementSignal.Set(); // Wait for the increment thread to finish - incrementTestDoneSignal.Wait(5000).Should().BeTrue(); + incrementTestDoneSignal.Wait(10_000).Should().BeTrue(); if (exceptionDispatchInfo is not null) { TestWriteLine($"Exception found on loop #{loop}"); diff --git a/Source/Tst/KZDev.PerfUtils.Memory.Fixed.UnitTests/xunit.runner.json b/Source/Tst/KZDev.PerfUtils.Memory.Fixed.UnitTests/xunit.runner.json index 1d2a02c..455ab8e 100644 --- a/Source/Tst/KZDev.PerfUtils.Memory.Fixed.UnitTests/xunit.runner.json +++ b/Source/Tst/KZDev.PerfUtils.Memory.Fixed.UnitTests/xunit.runner.json @@ -1,5 +1,5 @@ { "$schema": "https://xunit.net/schema/current/xunit.runner.schema.json", "parallelizeAssembly": true, - "parallelizeTestCollections" : true, + "parallelizeTestCollections" : true } \ No newline at end of file diff --git a/Source/Tst/KZDev.PerfUtils.Memory.Heap.UnitTests/xunit.runner.json b/Source/Tst/KZDev.PerfUtils.Memory.Heap.UnitTests/xunit.runner.json index 1d2a02c..455ab8e 100644 --- a/Source/Tst/KZDev.PerfUtils.Memory.Heap.UnitTests/xunit.runner.json +++ b/Source/Tst/KZDev.PerfUtils.Memory.Heap.UnitTests/xunit.runner.json @@ -1,5 +1,5 @@ { "$schema": "https://xunit.net/schema/current/xunit.runner.schema.json", "parallelizeAssembly": true, - "parallelizeTestCollections" : true, + "parallelizeTestCollections" : true } \ No newline at end of file diff --git a/Source/Tst/KZDev.PerfUtils.Memory.Native.UnitTests/xunit.runner.json b/Source/Tst/KZDev.PerfUtils.Memory.Native.UnitTests/xunit.runner.json index 1d2a02c..455ab8e 100644 --- a/Source/Tst/KZDev.PerfUtils.Memory.Native.UnitTests/xunit.runner.json +++ b/Source/Tst/KZDev.PerfUtils.Memory.Native.UnitTests/xunit.runner.json @@ -1,5 +1,5 @@ { "$schema": "https://xunit.net/schema/current/xunit.runner.schema.json", "parallelizeAssembly": true, - "parallelizeTestCollections" : true, + "parallelizeTestCollections" : true } \ No newline at end of file diff --git a/Source/Tst/KZDev.PerfUtils.Memory.UnitTests/xunit.runner.json b/Source/Tst/KZDev.PerfUtils.Memory.UnitTests/xunit.runner.json index 1d2a02c..455ab8e 100644 --- a/Source/Tst/KZDev.PerfUtils.Memory.UnitTests/xunit.runner.json +++ b/Source/Tst/KZDev.PerfUtils.Memory.UnitTests/xunit.runner.json @@ -1,5 +1,5 @@ { "$schema": "https://xunit.net/schema/current/xunit.runner.schema.json", "parallelizeAssembly": true, - "parallelizeTestCollections" : true, + "parallelizeTestCollections" : true } \ No newline at end of file