mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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>. ```
This commit is contained in:
parent
b0b5a4e86e
commit
19504d115d
1 changed files with 1 additions and 0 deletions
|
@ -187,6 +187,7 @@ module Net
|
|||
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)
|
||||
|
|
Loading…
Add table
Reference in a new issue