From 50c98942a57e44242825bac81790f110a300adab Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Wed, 6 Dec 2006 20:28:26 +0000 Subject: 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 --- activerecord/test/locking_test.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'activerecord/test/locking_test.rb') 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 -- cgit v1.2.3