Skip to content

Commit 815eb58

Browse files
luke-gruberjhawthorn
authored andcommitted
Fix btest in ractor_test.rb that can lead timeout of the test
It could also potentially lead to an out of memory error.
1 parent c1c9dee commit 815eb58

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

bootstraptest/test_ractor.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1455,11 +1455,19 @@ class C
14551455
loop do
14561456
10_000.times.map { Object.new }
14571457
port << Time.now
1458+
Ractor.receive
14581459
end
14591460
end
14601461
end
14611462
1462-
1_000.times { port.receive }
1463+
100.times {
1464+
workers.each do
1465+
port.receive
1466+
end
1467+
workers.each do |w|
1468+
w.send(nil)
1469+
end
1470+
}
14631471
"ok"
14641472
} if !yjit_enabled? && ENV['GITHUB_WORKFLOW'] != 'ModGC' # flaky
14651473

0 commit comments

Comments
 (0)