summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2019-09-03 12:27:53 +0900
committerYusuke Endoh <mame@ruby-lang.org>2019-09-03 12:29:36 +0900
commit547887138f19959f649b1c0dbcde5659ae3878ed (patch)
treec5f7d956cc80242a6bc77cd8e93726f4f5e8c84c /test/ruby
parente6c4ea22d62c95ce0590849219da505fef5a538e (diff)
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>. ```
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_fiber.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/ruby/test_fiber.rb b/test/ruby/test_fiber.rb
index ca1b68a73b..3b2faa9802 100644
--- a/test/ruby/test_fiber.rb
+++ b/test/ruby/test_fiber.rb
@@ -311,7 +311,9 @@ class TestFiber < Test::Unit::TestCase
Fiber.new {
xpid = fork do
# enough to trigger GC on old root fiber
- 10000.times do
+ count = 10000
+ count = 1000 if /openbsd/i =~ RUBY_PLATFORM
+ count.times do
Fiber.new {}.transfer
Fiber.new { Fiber.yield }
end