Skip to content

Commit

Permalink
test/net/smtp/test_smtp.rb: wait a moment before socket is closed
Browse files Browse the repository at this point in the history
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>.
```
  • Loading branch information
mame committed Apr 29, 2021
1 parent b0b5a4e commit 19504d1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/net/smtp/test_smtp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ def test_eof_error_backtrace
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)
Expand Down

0 comments on commit 19504d1

Please sign in to comment.