From efa8df2886d575ddd4b4ab75dd9c7586e0e3a1d4 Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA Date: Fri, 5 Jun 2020 11:45:30 +0900 Subject: `local_address` may raise IOError in debug print https://rubyci.org/logs/rubyci.s3.amazonaws.com/wsl2/ruby-master/log/20200605T020004Z.fail.html.gz ``` [ 984/20282] IMAPTest#test_connection_closed_without_greeting# terminated with exception (report_on_exception is true): /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/.ext/common/socket.rb:252:in `local_address': closed stream (IOError) from /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/.ext/common/socket.rb:252:in `connect_address' from /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/test/net/imap/test_imap.rb:514:in `block (2 levels) in test_connection_closed_without_greeting' from /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/test/net/imap/test_imap.rb:514:in `each_object' from /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/test/net/imap/test_imap.rb:514:in `each' from /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/test/net/imap/test_imap.rb:514:in `map' from /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/test/net/imap/test_imap.rb:514:in `block in test_connection_closed_without_greeting' from /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/test/net/imap/test_imap.rb:134:in `block in start_server' ``` --- test/net/imap/test_imap.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/net/imap/test_imap.rb b/test/net/imap/test_imap.rb index 9561fd55fd..8b924b524e 100644 --- a/test/net/imap/test_imap.rb +++ b/test/net/imap/test_imap.rb @@ -511,7 +511,7 @@ class IMAPTest < Test::Unit::TestCase sock_addr: sock.addr, sock_peeraddr: sock.peeraddr, t: Process.clock_gettime(Process::CLOCK_MONOTONIC), - sockets: ObjectSpace.each_object(BasicSocket).map{|s| [s.inspect, connect_address: s.connect_address.inspect, local_address: s.local_address.inspect, remote_address: (s.remote_address rescue nil).inspect] }, + sockets: ObjectSpace.each_object(BasicSocket).map{|s| [s.inspect, connect_address: (s.connect_address rescue nil).inspect, local_address: (s.local_address rescue nil).inspect, remote_address: (s.remote_address rescue nil).inspect] }, } sock.close h[:in_start_server_sock_closed] = { -- cgit v1.2.3