Skip to content

Commit

Permalink
Update the ActiveRecord tests to not set unused options
Browse files Browse the repository at this point in the history
	This makes a test fail, but it is revealing a bug in Arel master.
  • Loading branch information
carllerche committed Oct 13, 2010
1 parent 0b6af35 commit 91ba758
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 19 deletions.
15 changes: 0 additions & 15 deletions activerecord/lib/active_record/test_case.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,6 @@ def assert_no_queries(&block)
assert_queries(0, &block)
end

def self.use_concurrent_connections
setup :connection_allow_concurrency_setup
teardown :connection_allow_concurrency_teardown
end

def connection_allow_concurrency_setup
@connection = ActiveRecord::Base.remove_connection
ActiveRecord::Base.establish_connection(@connection.merge({:allow_concurrency => true}))
end

def connection_allow_concurrency_teardown
ActiveRecord::Base.clear_all_connections!
ActiveRecord::Base.establish_connection(@connection)
end

def with_kcode(kcode)
if RUBY_VERSION < '1.9'
orig_kcode, $KCODE = $KCODE, kcode
Expand Down
2 changes: 0 additions & 2 deletions activerecord/test/cases/locking_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,6 @@ def test_sane_lock_method
end

if current_adapter?(:PostgreSQLAdapter, :OracleAdapter)
use_concurrent_connections

def test_no_locks_no_wait
first, second = duel { Person.find 1 }
assert first.end > second.end
Expand Down
2 changes: 0 additions & 2 deletions activerecord/test/cases/transactions_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -529,8 +529,6 @@ def test_no_automatic_savepoint_for_inner_transaction

if current_adapter?(:PostgreSQLAdapter)
class ConcurrentTransactionTest < TransactionTest
use_concurrent_connections

# This will cause transactions to overlap and fail unless they are performed on
# separate database connections.
def test_transaction_per_thread
Expand Down

0 comments on commit 91ba758

Please sign in to comment.