-
-
Notifications
You must be signed in to change notification settings - Fork 119
Open
Labels
StalebugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed
Description
Description
Several tests verify parallel/non-parallel execution by checking DateTime overlaps, which are inherently fragile:
ParallelTests.cs and NotInParallelTests.cs
Use DateTimeRange overlaps to verify parallel/sequential execution. DateTime precision depends on system clock granularity. On slow CI systems, tests might complete too quickly for overlap detection.
TimeoutTests1.cs (Lines 18-19)
Tight timing assertion expecting test to complete between 4-60 seconds. Fragile on resource-constrained CI.
AdaptiveParallelismTests.cs
CPU-intensive loop using DateTime.UtcNow comparisons (system clock dependent). 1000 repetitions × 1s delay = 16+ minutes per test method.
Suggested Fix
- Replace DateTime overlap checks with
Interlockedconcurrent execution counters - Use event-based synchronization (
TaskCompletionSource) instead of hard timeouts - Widen timing windows with documented rationale
- Separate AdaptiveParallelismTests into a
[Category("Performance")]suite
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
StalebugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed