Skip to content

Comments

Skip threaded cache test on Windows#1080

Merged
suketa merged 3 commits intomainfrom
skip-thread-test-on-windows
Feb 8, 2026
Merged

Skip threaded cache test on Windows#1080
suketa merged 3 commits intomainfrom
skip-thread-test-on-windows

Conversation

@suketa
Copy link
Owner

@suketa suketa commented Feb 8, 2026

Problem

The test_get_or_create test in instance_cache_test.rb hangs on Windows, causing CI tests to run for 40+ minutes without completing. This test creates 30 threads to test concurrent cache access.

On Windows with certain Ruby versions (observed with Ruby 3.3.10), Thread.join appears to hang or take an extremely long time to complete.

Root Cause

The test on line 14-21 runs:

30.times do
  run_threaded_cache_test(cache, path)  # Creates a thread and calls thread.join
  FileUtils.rm_f(path)
end

This is the likely cause of the Windows CI hanging issue.

Solution

Skip this test on Windows platforms using:

skip 'Thread.join hangs on Windows' if RUBY_PLATFORM.match?(/mingw|mswin|cygwin/)

Impact

  • Test still runs on Linux and macOS (where it works fine)
  • Windows tests will skip this one test but run all others
  • Prevents Windows CI from hanging indefinitely
  • Complements PR Add 120-minute timeout to CI test workflows #1079 (timeout) as a more targeted fix

Testing

  • Verified test still runs on Linux (not skipped)
  • Windows CI should now complete without hanging

Fixes the root cause of hanging Windows CI tests.

The test_get_or_create test uses Thread.join which can hang on Windows,
causing CI tests to run indefinitely.

This test creates 30 threads to test concurrent cache access. On Windows
with certain Ruby versions (observed with 3.3.10), Thread.join appears
to hang or take an extremely long time.

Skip this test on Windows platforms (mingw, mswin, cygwin) to prevent
CI timeouts.
@coderabbitai
Copy link

coderabbitai bot commented Feb 8, 2026

Warning

Rate limit exceeded

@suketa has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 10 minutes and 35 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch skip-thread-test-on-windows

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@suketa suketa merged commit 7ac2ebd into main Feb 8, 2026
37 of 38 checks passed
@suketa suketa deleted the skip-thread-test-on-windows branch February 8, 2026 01:33
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