From a3f12f575d4bf216a15188ecab2d26a11162bc3b Mon Sep 17 00:00:00 2001 From: Nick Sieger Date: Thu, 4 Sep 2008 15:16:29 +0200 Subject: Default connection allow_concurrency to false (for PostgreSQL) Signed-off-by: Jeremy Kemper --- activerecord/test/cases/locking_test.rb | 2 ++ activerecord/test/cases/transactions_test.rb | 2 ++ 2 files changed, 4 insertions(+) (limited to 'activerecord/test') diff --git a/activerecord/test/cases/locking_test.rb b/activerecord/test/cases/locking_test.rb index bbe8582466..0a14b1d906 100644 --- a/activerecord/test/cases/locking_test.rb +++ b/activerecord/test/cases/locking_test.rb @@ -257,6 +257,8 @@ unless current_adapter?(:SQLServerAdapter, :SybaseAdapter, :OpenBaseAdapter) 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 diff --git a/activerecord/test/cases/transactions_test.rb b/activerecord/test/cases/transactions_test.rb index a8016cd984..b12ec36455 100644 --- a/activerecord/test/cases/transactions_test.rb +++ b/activerecord/test/cases/transactions_test.rb @@ -284,6 +284,8 @@ end 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 -- cgit v1.2.3