Skip to content

Commit 84e7576

Browse files
committed
✅ Configurable report_on_exception for FakeServer
1 parent b55b945 commit 84e7576

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/net/imap/fake_server/test_helper.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@
44

55
module Net::IMAP::FakeServer::TestHelper
66

7-
def run_fake_server_in_thread(ignore_io_error: false, timeout: 10, **opts)
7+
def run_fake_server_in_thread(ignore_io_error: false,
8+
report_on_exception: true,
9+
timeout: 10, **opts)
810
Timeout.timeout(timeout) do
911
server = Net::IMAP::FakeServer.new(timeout: timeout, **opts)
1012
@threads << Thread.new do
13+
Thread.current.abort_on_exception = false
14+
Thread.current.report_on_exception = report_on_exception
1115
server.run
1216
rescue IOError
1317
raise unless ignore_io_error

0 commit comments

Comments
 (0)