Skip to content

Commit e552e5a

Browse files
mamehsbt
authored andcommitted
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.
1 parent 49daaa6 commit e552e5a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/net/http/test_http.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ def test_timeout_during_HTTP_session
569569

570570
conn = Net::HTTP.new('localhost', port)
571571
conn.read_timeout = EnvUtil.apply_timeout_scale(0.01)
572-
conn.open_timeout = EnvUtil.apply_timeout_scale(0.1)
572+
conn.open_timeout = EnvUtil.apply_timeout_scale(1)
573573

574574
th = Thread.new do
575575
assert_raise(Net::ReadTimeout) {

0 commit comments

Comments
 (0)