diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2018-01-29 20:37:48 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2018-01-29 20:37:48 +0900 |
commit | bee764965e80b0f4f0a15c31b340f245779a7d89 (patch) | |
tree | 1500badabbb640db63199bfe6803fe47298cf60e /activesupport/test/cache | |
parent | 133dc3b6d0d270fff4a728c8f9f717b6d209b599 (diff) | |
download | rails-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/test/cache')
-rw-r--r-- | activesupport/test/cache/behaviors/connection_pool_behavior.rb | 4 |
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 |