ruby-changes:66018
From: Yusuke <ko1@a...>
Date: Fri, 30 Apr 2021 01:40:06 +0900 (JST)
Subject: [ruby-changes:66018] 19504d115d (master): test/net/smtp/test_smtp.rb: wait a moment before socket is closed
https://git.ruby-lang.org/ruby.git/commit/?id=19504d115d From 19504d115dc09558255fcb5213f80dd8454ab189 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh <mame@r...> Date: Fri, 30 Apr 2021 01:36:04 +0900 Subject: test/net/smtp/test_smtp.rb: wait a moment before socket is closed On Solaris, Socket.tcp seems to fail with EINVAL if the server closes the connection immediately after accpeted. I think this is a bug of Socket.tcp, but seems difficult to fix soon. http://rubyci.s3.amazonaws.com/solaris11-sunc/ruby-master/log/20210429T100007Z.fail.html.gz ``` 1) Failure: Net::TestSMTP#test_eof_error_backtrace [/export/home/chkbuild/chkbuild-sunc/tmp/build/20210429T100007Z/ruby/test/net/smtp/test_smtp.rb:193]: [ruby-core:78550] [Bug #13018]. [EOFError] exception expected, not #<Net::ReadTimeout: Net::ReadTimeout>. ``` --- test/net/smtp/test_smtp.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/test/net/smtp/test_smtp.rb b/test/net/smtp/test_smtp.rb index 9b044ec..91974d4 100644 --- a/test/net/smtp/test_smtp.rb +++ b/test/net/smtp/test_smtp.rb @@ -187,6 +187,7 @@ module Net https://github.com/ruby/ruby/blob/trunk/test/net/smtp/test_smtp.rb#L187 sock = nil t = Thread.start do sock = accept(servers) + sleep 0.1 sock.close end smtp = Net::SMTP.new("localhost", servers[0].local_address.ip_port) -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/