Skip to content

Commit 19504d1

Browse files
committed
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 ruby#13018]. [EOFError] exception expected, not #<Net::ReadTimeout: Net::ReadTimeout>. ```
1 parent b0b5a4e commit 19504d1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/net/smtp/test_smtp.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ def test_eof_error_backtrace
187187
sock = nil
188188
t = Thread.start do
189189
sock = accept(servers)
190+
sleep 0.1
190191
sock.close
191192
end
192193
smtp = Net::SMTP.new("localhost", servers[0].local_address.ip_port)

0 commit comments

Comments
 (0)