ruby-changes:60465
From: Yusuke <ko1@a...>
Date: Sat, 21 Mar 2020 23:09:38 +0900 (JST)
Subject: [ruby-changes:60465] 5908914ea2 (master): test/net/http/test_http.rb: relax open_timeout limit
https://git.ruby-lang.org/ruby.git/commit/?id=5908914ea2 From 5908914ea2dcb666e099747006e4de262b46ed77 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh <mame@r...> Date: Sat, 21 Mar 2020 23:05:45 +0900 Subject: test/net/http/test_http.rb: relax open_timeout limit The test fails randomly on the CI of OpenCSW SPARC Solaris 10: https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable10s/ruby-master/log/20200321T091909Z.fail.html.gz ``` 1) Failure: TestNetHTTP_v1_2_chunked#test_timeout_during_HTTP_session [/export/home/rubyci/unstable10s/tmp/build/20200321T091909Z/ruby/test/net/http/test_http.rb:575]: [Net::ReadTimeout] exception expected, not #<Net::OpenTimeout: execution expired>. ``` The environment uses RUBY_TEST_SUBPROCESS_TIMEOUT_SCALE=20, so the open timeout 0.1 sec. means 2.0 sec. for the environment, but it seems too strict because the environment is painfully slow. diff --git a/test/net/http/test_http.rb b/test/net/http/test_http.rb index c05c5f7..22448d8 100644 --- a/test/net/http/test_http.rb +++ b/test/net/http/test_http.rb @@ -569,7 +569,7 @@ module TestNetHTTP_version_1_1_methods https://github.com/ruby/ruby/blob/trunk/test/net/http/test_http.rb#L569 conn = Net::HTTP.new('localhost', port) conn.read_timeout = EnvUtil.apply_timeout_scale(0.01) - conn.open_timeout = EnvUtil.apply_timeout_scale(0.1) + conn.open_timeout = EnvUtil.apply_timeout_scale(1) th = Thread.new do assert_raise(Net::ReadTimeout) { -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/