From 53dc787aab57a48f09d81435051d44a35f530a63 Mon Sep 17 00:00:00 2001 From: Keita Urashima Date: Wed, 3 Jun 2026 11:00:11 +0900 Subject: [PATCH] FIX: skip perform_microtask_checkpoint tests on TruffleRuby perform_microtask_checkpoint is a V8-only API (the TruffleRuby backend does not implement it). The two tests added in #418 call it without a TruffleRuby guard; test_perform_microtask_checkpoint_drains_from_callback invokes it from inside a JS->Ruby callback, which hangs the TruffleRuby graal.js context indefinitely and makes the truffleruby CI job exceed its 10-minute timeout (taking the whole suite red). Skip both on TruffleRuby, matching the convention used by other V8-only tests (max_memory, webassembly, ...). Verified locally with truffleruby+graalvm-34.0.1: the suite now completes (113 runs, 0 failures, 34 skips) instead of hanging. Co-Authored-By: Claude Opus 4.8 (1M context) --- test/mini_racer_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/mini_racer_test.rb b/test/mini_racer_test.rb index a9ffe38..294c832 100644 --- a/test/mini_racer_test.rb +++ b/test/mini_racer_test.rb @@ -987,11 +987,17 @@ def test_promise end def test_perform_microtask_checkpoint_returns_nil + if RUBY_ENGINE == "truffleruby" + skip "TruffleRuby does not implement perform_microtask_checkpoint (V8-only)" + end context = MiniRacer::Context.new assert_nil(context.perform_microtask_checkpoint) end def test_perform_microtask_checkpoint_drains_from_callback + if RUBY_ENGINE == "truffleruby" + skip "TruffleRuby does not implement perform_microtask_checkpoint (V8-only)" + end context = MiniRacer::Context.new seen = []