Skip to content

Comments

fix: remove quarantine from flaky timing tests#340

Closed
RicherTunes wants to merge 2 commits intomainfrom
fix/flaky-timing-tests
Closed

fix: remove quarantine from flaky timing tests#340
RicherTunes wants to merge 2 commits intomainfrom
fix/flaky-timing-tests

Conversation

@RicherTunes
Copy link
Owner

Summary

Fixes two quarantined tests that were failing due to timing precision issues on slow CI runners:

  1. ConcurrentCache_Should_HandleExpiration (SecurityTestSuite.cs)

    • Previous: 100ms expiration, 300ms wait
    • Fixed: 500ms expiration, 1500ms wait (3x margin)
  2. RunSyncWithTimeout_WithTimeout_ThrowsTimeout (SafeAsyncHelperTests.cs)

    • Previous: Task.Delay(200).ContinueWith() with 100ms timeout
    • Problem: Task started executing before timeout measurement began
    • Fixed: Use Task.Run to ensure timing starts when measured (1000ms task, 200ms timeout)

Root Cause

Both tests were flaky because:

  • Task.Delay timing precision varies across systems
  • CI runners can have significant scheduling jitter
  • The previous margins (2-3x) weren't sufficient for slow environments

Test plan

  • Tests compile
  • Tests pass locally (build locked by parallel work)
  • Tests pass in CI

🤖 Generated with Claude Code

RicherTunes and others added 2 commits December 19, 2025 11:25
- Change TargetFrameworks from net6.0;net8.0 to net8.0 only
- Remove net6.0 from nightly CI matrix
- Clean up net6.0 LidarrPath fallback logic
- Align with lidarr.plugin.common which only supports net8.0

This fixes nightly CI failures caused by TFM incompatibility with the
lidarr.plugin.common submodule.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- ConcurrentCache_Should_HandleExpiration: Increase timing margins
  (500ms expiration, 1500ms wait) for CI stability
- RunSyncWithTimeout_WithTimeout_ThrowsTimeout: Use Task.Run to ensure
  delay starts when measured (1000ms task, 200ms timeout)

Both tests were quarantined due to timing precision issues on slow CI
runners. The fixes use more generous margins to avoid false negatives.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

⚠️ Deprecation Warning: The deny-licenses option is deprecated for possible removal in the next major release. For more information, see issue 997.

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@RicherTunes
Copy link
Owner Author

Stale — superseded by packaging-gates adoption (#397) and ecosystem standardization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant