ruby-changes:64671
From: Takashi <ko1@a...>
Date: Wed, 30 Dec 2020 15:03:38 +0900 (JST)
Subject: [ruby-changes:64671] 15c129d087 (master): Try increasing SMTP's read_timeout for --jit-wait
https://git.ruby-lang.org/ruby.git/commit/?id=15c129d087 From 15c129d08790878444f3ecbdef0f8fe15eed06f4 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun <takashikkbn@g...> Date: Tue, 29 Dec 2020 22:02:46 -0800 Subject: Try increasing SMTP's read_timeout for --jit-wait for random hangs like: http://ci.rvm.jp/results/trunk-mjit-wait@phosphorus-docker/3302796 http://ci.rvm.jp/results/trunk-mjit-wait@phosphorus-docker/3302188 http://ci.rvm.jp/results/trunk-mjit-wait@phosphorus-docker/3301293 diff --git a/test/net/smtp/test_smtp.rb b/test/net/smtp/test_smtp.rb index af30bb7..e909909 100644 --- a/test/net/smtp/test_smtp.rb +++ b/test/net/smtp/test_smtp.rb @@ -29,6 +29,17 @@ module Net https://github.com/ruby/ruby/blob/trunk/test/net/smtp/test_smtp.rb#L29 end def setup + # Avoid hanging at fake_server_start's IO.select on --jit-wait CI like http://ci.rvm.jp/results/trunk-mjit-wait@phosphorus-docker/3302796 + # Unfortunately there's no way to configure read_timeout for Net::SMTP.start. + if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? + Net::SMTP.prepend Module.new { + def initialize(*) + super + @read_timeout *= 5 + end + } + end + @server_threads = [] end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/