Fix btest in ractor_test.rb that can lead timeout of the test

It could also potentially lead to an out of memory error.
This commit is contained in:
Luke Gruber 2025-07-11 19:16:58 -04:00 committed by John Hawthorn
parent c1c9deea83
commit 815eb58fce

View file

@ -1455,11 +1455,19 @@ assert_equal "ok", %q{
loop do loop do
10_000.times.map { Object.new } 10_000.times.map { Object.new }
port << Time.now port << Time.now
Ractor.receive
end end
end 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" "ok"
} if !yjit_enabled? && ENV['GITHUB_WORKFLOW'] != 'ModGC' # flaky } if !yjit_enabled? && ENV['GITHUB_WORKFLOW'] != 'ModGC' # flaky