aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2018-01-29 20:37:48 +0900
committeryuuji.yaginuma <yuuji.yaginuma@gmail.com>2018-01-29 20:37:48 +0900
commitbee764965e80b0f4f0a15c31b340f245779a7d89 (patch)
tree1500badabbb640db63199bfe6803fe47298cf60e /activesupport
parent133dc3b6d0d270fff4a728c8f9f717b6d209b599 (diff)
downloadrails-bee764965e80b0f4f0a15c31b340f245779a7d89.tar.gz
rails-bee764965e80b0f4f0a15c31b340f245779a7d89.tar.bz2
rails-bee764965e80b0f4f0a15c31b340f245779a7d89.zip
Suppress expected exceptions by `report_on_exception` = `false`
This suppresses `Timeout::Error` exceptions. Ref: https://travis-ci.org/rails/rails/jobs/334622442#L1089-L1110
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/test/cache/behaviors/connection_pool_behavior.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/test/cache/behaviors/connection_pool_behavior.rb b/activesupport/test/cache/behaviors/connection_pool_behavior.rb
index 500d51a134..0d46f88552 100644
--- a/activesupport/test/cache/behaviors/connection_pool_behavior.rb
+++ b/activesupport/test/cache/behaviors/connection_pool_behavior.rb
@@ -2,6 +2,8 @@
module ConnectionPoolBehavior
def test_connection_pool
+ Thread.report_on_exception, original_report_on_exception = false, Thread.report_on_exception if Thread.respond_to?(:report_on_exception)
+
emulating_latency do
begin
cache = ActiveSupport::Cache.lookup_store(store, pool_size: 2, pool_timeout: 1)
@@ -24,6 +26,8 @@ module ConnectionPoolBehavior
threads.each(&:kill)
end
end
+ ensure
+ Thread.report_on_exception = original_report_on_exception if Thread.respond_to?(:report_on_exception)
end
def test_no_connection_pool