summaryrefslogtreecommitdiff
path: root/test/net/http/test_http.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-07 06:18:23 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-07 06:18:23 +0000
commit265bfdfbf5a809a7e22231ae25a551eda23cbf7d (patch)
tree281adf761e9c10c2034c8d2883f4cca239dd463a /test/net/http/test_http.rb
parentd7e80175190705f123733e0eec30b341c673b330 (diff)
skip write_timeout test on Windows
This test is about write_timeout. To ensure it really raised Net::WriteTimeout, skip this test on Windows, whose write returns immediately even for large data. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/net/http/test_http.rb')
-rw-r--r--test/net/http/test_http.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/net/http/test_http.rb b/test/net/http/test_http.rb
index 804fb73b1d..fbfe7442b0 100644
--- a/test/net/http/test_http.rb
+++ b/test/net/http/test_http.rb
@@ -530,7 +530,7 @@ module TestNetHTTP_version_1_1_methods
end
def test_timeout_during_HTTP_session_write
- bug4246 = "expected the HTTP session to have timed out but have not. c.f. [ruby-core:34203]"
+ skip "write returns immediately on Windows" if windows?
th = nil
# listen for connections... but deliberately do not read
@@ -538,15 +538,15 @@ module TestNetHTTP_version_1_1_methods
port = server.addr[1]
conn = Net::HTTP.new('localhost', port)
- conn.read_timeout = conn.write_timeout = 0.01
+ conn.write_timeout = 0.01
conn.open_timeout = 0.1
th = Thread.new do
- assert_raise(Net::WriteTimeout, Net::ReadTimeout) {
- conn.post('/', "a"*50_000_000)
+ assert_raise(Net::WriteTimeout) {
+ conn.post('/', "a"*5_000_000)
}
end
- assert th.join(10), bug4246
+ assert th.join(10)
}
ensure
th.kill