diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-12-06 20:28:26 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-12-06 20:28:26 +0000 |
commit | 50c98942a57e44242825bac81790f110a300adab (patch) | |
tree | 31683915b370f632a9867d80bd08d1d855ad8f21 /activerecord | |
parent | 07423bed4bf00626fcd9328557fa509fa86f6680 (diff) | |
download | rails-50c98942a57e44242825bac81790f110a300adab.tar.gz rails-50c98942a57e44242825bac81790f110a300adab.tar.bz2 rails-50c98942a57e44242825bac81790f110a300adab.zip |
Don't do introspection queries during locking tests [Michael Schoen]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5689 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/locking_test.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/activerecord/test/locking_test.rb b/activerecord/test/locking_test.rb index a4646dd9d0..f786d77027 100644 --- a/activerecord/test/locking_test.rb +++ b/activerecord/test/locking_test.rb @@ -86,9 +86,12 @@ end unless current_adapter?(:SQLServerAdapter) class PessimisticLockingTest < Test::Unit::TestCase self.use_transactional_fixtures = false - fixtures :people + fixtures :people, :readers def setup + # Avoid introspection queries during tests. + Person.columns; Reader.columns + @allow_concurrency = ActiveRecord::Base.allow_concurrency ActiveRecord::Base.allow_concurrency = true end @@ -123,7 +126,7 @@ unless current_adapter?(:SQLServerAdapter) def test_eager_find_with_lock assert_nothing_raised do Person.transaction do - Reader.find 1, :include => :person, :lock => true + Person.find 1, :include => :readers, :lock => true end end end |