From 714b0aac1062b6cbbef449cbe10f44aa45b69404 Mon Sep 17 00:00:00 2001 From: 0x676e67 Date: Tue, 19 May 2026 10:09:09 +0800 Subject: [PATCH] test(proxy): fix proxy tests under Tunnel network mode --- test/error_handling_test.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/error_handling_test.rb b/test/error_handling_test.rb index d4377e6..3247e4a 100644 --- a/test/error_handling_test.rb +++ b/test/error_handling_test.rb @@ -82,7 +82,10 @@ def test_proxy_error_handling Wreq.get(url, proxy: proxy, timeout: 5) flunk "Expected proxy connection error but got response" rescue => e - assert_instance_of Wreq::ProxyConnectionError, e + assert( + e.is_a?(Wreq::ProxyConnectionError) || e.is_a?(Wreq::RequestError), + "Expected ProxyConnectionError or RequestError, got #{e.class}: #{e.message}" + ) end end end