From b2c0ddf033fbf143539ad8a7630747a0e866e4fc Mon Sep 17 00:00:00 2001 From: Marcel Molina Date: Thu, 27 Apr 2006 22:39:45 +0000 Subject: Add support for FrontBase (http://www.frontbase.com/) with a new adapter thanks to the hard work of one Mike Laster. Closes #4093. [mlaster@metavillage.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4291 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/test/threaded_connections_test.rb | 34 ++++++++++++++------------ 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'activerecord/test/threaded_connections_test.rb') diff --git a/activerecord/test/threaded_connections_test.rb b/activerecord/test/threaded_connections_test.rb index d9cc47eef3..a812ec642c 100644 --- a/activerecord/test/threaded_connections_test.rb +++ b/activerecord/test/threaded_connections_test.rb @@ -1,10 +1,11 @@ require 'abstract_unit' require 'fixtures/topic' -class ThreadedConnectionsTest < Test::Unit::TestCase - self.use_transactional_fixtures = false +unless %w(FrontBase).include? ActiveRecord::Base.connection.adapter_name + class ThreadedConnectionsTest < Test::Unit::TestCase + self.use_transactional_fixtures = false - fixtures :topics + fixtures :topics def setup @connection = ActiveRecord::Base.remove_connection @@ -25,21 +26,22 @@ class ThreadedConnectionsTest < Test::Unit::TestCase ActiveRecord::Base.allow_concurrency = use_threaded_connections ActiveRecord::Base.establish_connection(@connection) - 5.times do - Thread.new do - Topic.find :first - @connections << ActiveRecord::Base.active_connections.values.first - end.join + 5.times do + Thread.new do + Topic.find :first + @connections << ActiveRecord::Base.active_connections.values.first + end.join + end end - end - def test_threaded_connections - gather_connections(true) - assert_equal @connections.uniq.length, 5 - end + def test_threaded_connections + gather_connections(true) + assert_equal @connections.uniq.length, 5 + end - def test_unthreaded_connections - gather_connections(false) - assert_equal @connections.uniq.length, 1 + def test_unthreaded_connections + gather_connections(false) + assert_equal @connections.uniq.length, 1 + end end end -- cgit v1.2.3