summaryrefslogtreecommitdiff
path: root/test/net/smtp/test_smtp.rb
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2021-04-30 01:36:04 +0900
committerYusuke Endoh <mame@ruby-lang.org>2021-04-30 01:36:04 +0900
commit19504d115dc09558255fcb5213f80dd8454ab189 (patch)
tree4f10da0167e4a92eaed2ff7d53bf284b6b72fbea /test/net/smtp/test_smtp.rb
parentb0b5a4e86ef2740c427f9356a4173a1debf4f79c (diff)
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>. ```
Diffstat (limited to 'test/net/smtp/test_smtp.rb')
-rw-r--r--test/net/smtp/test_smtp.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/net/smtp/test_smtp.rb b/test/net/smtp/test_smtp.rb
index 9b044ec1a2..91974d4dfe 100644
--- a/test/net/smtp/test_smtp.rb
+++ b/test/net/smtp/test_smtp.rb
@@ -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)