aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2017-01-02 05:04:17 +1030
committerMatthew Draper <matthew@trebex.net>2017-01-02 05:04:17 +1030
commitdae525eec8062bfbbe39141de448053b127d4756 (patch)
tree3409363e6ecf912b94a286ec3f93102c1c705cf8 /activerecord/test/models
parent19deeb08df6279a9cbf0c65548641776c0451471 (diff)
downloadrails-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.rb2
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