From aa0229a08df44c5dc44c1bd7496303aaec1b45f2 Mon Sep 17 00:00:00 2001 From: nicholas evans Date: Fri, 4 Aug 2023 07:04:17 -0400 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20Guard=20against=20inconsequntial=20?= =?UTF-8?q?CI=20failures?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I haven't reproduced these eriors locally! But they occur regularly in CI. Perhaps there is a race condition? --- test/net/imap/fake_server/command_router.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/test/net/imap/fake_server/command_router.rb b/test/net/imap/fake_server/command_router.rb index 96996148..3c46daa1 100644 --- a/test/net/imap/fake_server/command_router.rb +++ b/test/net/imap/fake_server/command_router.rb @@ -55,7 +55,17 @@ def handler_for(command) resp.args.nil? or return resp.fail_bad_args resp.bye state.logout - resp.done_ok + begin + resp.done_ok + rescue IOError + # TODO: fix whatever is causing this! + warn "connection issue after bye but before LOGOUT could complete" + if $!.respond_to :detailed_message + warn $!.detailed_message highlight: true, order: :bottom + else + warn $!.full_message highlight: true, order: :bottom + end + end end on "STARTTLS" do |resp|