Skip to content

Commit a8baf02

Browse files
committed
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`.
1 parent 972cd5c commit a8baf02

6 files changed

Lines changed: 9 additions & 9 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"$schema": "https://xunit.net/schema/current/xunit.runner.schema.json",
33
"parallelizeAssembly": true,
4-
"parallelizeTestCollections" : true,
4+
"parallelizeTestCollections" : true
55
}

Source/Tst/KZDev.PerfUtils.Concurrency.UnitTests/UsingInterlockedOps`.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ private void UsingInterlockedOps_IntegerOperation_WithContention_SavesProperResu
9494
// Signal the increment thread to run
9595
runIncrementSignal.Set();
9696
// Wait for the increment thread to finish
97-
incrementTestDoneSignal.Wait(5000).Should().BeTrue();
97+
incrementTestDoneSignal.Wait(10_000).Should().BeTrue();
9898
if (exceptionDispatchInfo is not null)
9999
{
100100
TestWriteLine($"Exception found on loop #{loop}");
@@ -281,7 +281,7 @@ private void UsingInterlockedOps_UnsignedIntegerOperation_WithContention_SavesPr
281281
// Signal the increment thread to run
282282
runIncrementSignal.Set();
283283
// Wait for the increment thread to finish
284-
incrementTestDoneSignal.Wait(5000).Should().BeTrue();
284+
incrementTestDoneSignal.Wait(10_000).Should().BeTrue();
285285
if (exceptionDispatchInfo is not null)
286286
{
287287
TestWriteLine($"Exception found on loop #{loop}");
@@ -468,7 +468,7 @@ private void UsingInterlockedOps_LongIntegerOperation_WithContention_SavesProper
468468
// Signal the increment thread to run
469469
runIncrementSignal.Set();
470470
// Wait for the increment thread to finish
471-
incrementTestDoneSignal.Wait(5000).Should().BeTrue();
471+
incrementTestDoneSignal.Wait(10_000).Should().BeTrue();
472472
if (exceptionDispatchInfo is not null)
473473
{
474474
TestWriteLine($"Exception found on loop #{loop}");
@@ -649,7 +649,7 @@ private void UsingInterlockedOps_UnsignedLongIntegerOperation_WithContention_Sav
649649
// Signal the increment thread to run
650650
runIncrementSignal.Set();
651651
// Wait for the increment thread to finish
652-
incrementTestDoneSignal.Wait(5000).Should().BeTrue();
652+
incrementTestDoneSignal.Wait(10_000).Should().BeTrue();
653653
if (exceptionDispatchInfo is not null)
654654
{
655655
TestWriteLine($"Exception found on loop #{loop}");
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"$schema": "https://xunit.net/schema/current/xunit.runner.schema.json",
33
"parallelizeAssembly": true,
4-
"parallelizeTestCollections" : true,
4+
"parallelizeTestCollections" : true
55
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"$schema": "https://xunit.net/schema/current/xunit.runner.schema.json",
33
"parallelizeAssembly": true,
4-
"parallelizeTestCollections" : true,
4+
"parallelizeTestCollections" : true
55
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"$schema": "https://xunit.net/schema/current/xunit.runner.schema.json",
33
"parallelizeAssembly": true,
4-
"parallelizeTestCollections" : true,
4+
"parallelizeTestCollections" : true
55
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"$schema": "https://xunit.net/schema/current/xunit.runner.schema.json",
33
"parallelizeAssembly": true,
4-
"parallelizeTestCollections" : true,
4+
"parallelizeTestCollections" : true
55
}

0 commit comments

Comments
 (0)