aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/cache/behaviors/connection_pool_behavior.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test/cache/behaviors/connection_pool_behavior.rb')
-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