diff options
author | Matthew Draper <matthew@trebex.net> | 2017-01-02 05:04:17 +1030 |
---|---|---|
committer | Matthew Draper <matthew@trebex.net> | 2017-01-02 05:04:17 +1030 |
commit | dae525eec8062bfbbe39141de448053b127d4756 (patch) | |
tree | 3409363e6ecf912b94a286ec3f93102c1c705cf8 /activerecord/test/models | |
parent | 19deeb08df6279a9cbf0c65548641776c0451471 (diff) | |
download | rails-dae525eec8062bfbbe39141de448053b127d4756.tar.gz rails-dae525eec8062bfbbe39141de448053b127d4756.tar.bz2 rails-dae525eec8062bfbbe39141de448053b127d4756.zip |
Replace sleep with synchronization
Diffstat (limited to 'activerecord/test/models')
-rw-r--r-- | activerecord/test/models/developer.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/models/developer.rb b/activerecord/test/models/developer.rb index 5ca1d37f6d..ea4f719517 100644 --- a/activerecord/test/models/developer.rb +++ b/activerecord/test/models/developer.rb @@ -251,7 +251,7 @@ class ThreadsafeDeveloper < ActiveRecord::Base self.table_name = "developers" def self.default_scope - sleep 0.05 if Thread.current[:long_default_scope] + Thread.current[:default_scope_delay].call limit(1) end end |