diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2018-04-30 15:54:50 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-30 15:54:50 -0400 |
commit | 5909cdb9625ce92ccee8dae534ab175c4f6efe00 (patch) | |
tree | 12f99cf722e832b3561ce69c9c3ff05a593d1091 /activesupport | |
parent | 8d4e0ab33d5aa4ad46bc648a0636aa788df828cb (diff) | |
parent | e04912393a8f52f9bb2f3309c4d24fb8eebdb6d4 (diff) | |
download | rails-5909cdb9625ce92ccee8dae534ab175c4f6efe00.tar.gz rails-5909cdb9625ce92ccee8dae534ab175c4f6efe00.tar.bz2 rails-5909cdb9625ce92ccee8dae534ab175c4f6efe00.zip |
Merge pull request #32763 from pvalena/as-fix-threads-nil
Fix test: threads being nil in ensure
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/test/cache/behaviors/connection_pool_behavior.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/test/cache/behaviors/connection_pool_behavior.rb b/activesupport/test/cache/behaviors/connection_pool_behavior.rb index 701cd75595..4d1901a173 100644 --- a/activesupport/test/cache/behaviors/connection_pool_behavior.rb +++ b/activesupport/test/cache/behaviors/connection_pool_behavior.rb @@ -4,13 +4,13 @@ module ConnectionPoolBehavior def test_connection_pool Thread.report_on_exception, original_report_on_exception = false, Thread.report_on_exception + threads = [] + emulating_latency do begin cache = ActiveSupport::Cache.lookup_store(store, { pool_size: 2, pool_timeout: 1 }.merge(store_options)) cache.clear - threads = [] - assert_raises Timeout::Error do # One of the three threads will fail in 1 second because our pool size # is only two. @@ -31,13 +31,13 @@ module ConnectionPoolBehavior end def test_no_connection_pool + threads = [] + emulating_latency do begin cache = ActiveSupport::Cache.lookup_store(store, store_options) cache.clear - threads = [] - assert_nothing_raised do # Default connection pool size is 5, assuming 10 will make sure that # the connection pool isn't used at all. |