From 815eb58fcef40d5ffedbb36f5de08fa6e06cc9b0 Mon Sep 17 00:00:00 2001 From: Luke Gruber Date: Fri, 11 Jul 2025 19:16:58 -0400 Subject: [PATCH] Fix btest in ractor_test.rb that can lead timeout of the test It could also potentially lead to an out of memory error. --- bootstraptest/test_ractor.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bootstraptest/test_ractor.rb b/bootstraptest/test_ractor.rb index 1c2a4b0b8e..14e78bd00b 100644 --- a/bootstraptest/test_ractor.rb +++ b/bootstraptest/test_ractor.rb @@ -1455,11 +1455,19 @@ assert_equal "ok", %q{ loop do 10_000.times.map { Object.new } port << Time.now + Ractor.receive end end end - 1_000.times { port.receive } + 100.times { + workers.each do + port.receive + end + workers.each do |w| + w.send(nil) + end + } "ok" } if !yjit_enabled? && ENV['GITHUB_WORKFLOW'] != 'ModGC' # flaky