8000 test/ruby/test_fiber.rb: reduce the count of object creation to cause GC · github/ruby@5478871 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5478871

Browse files
committed
test/ruby/test_fiber.rb: reduce the count of object creation to cause GC
The test consistently fails on OpenBSD. https://rubyci.org/logs/rubyci.s3.amazonaws.com/openbsd-current/ruby-master/log/20190903T010009Z.fail.html.gz ``` 1) Failure: TestFiber#test_fork_from_fiber [/home/chkbuild/chkbuild/tmp/build/20190903T010009Z/ruby/test/ruby/test_fiber.rb:327]: [ruby-core:41456]. <0> expected but was <1>. ```
1 parent e6c4ea2 commit 5478871

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/ruby/test_fiber.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,9 @@ def test_fork_from_fiber
311311
Fiber.new {
312312
xpid = fork do
313313
# enough to trigger GC on old root fiber
314-
10000.times do
314+
count = 10000
315+
count = 1000 if /openbsd/i =~ RUBY_PLATFORM
316+
count.times do
315317
Fiber.new {}.transfer
316318
Fiber.new { Fiber.yield }
317319
end

0 commit comments

Comments
 (0)
0