aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/threaded_connections_test.rb
diff options
context:
space:
mode:
authorMarcel Molina <marcel@vernix.org>2006-04-27 22:39:45 +0000
committerMarcel Molina <marcel@vernix.org>2006-04-27 22:39:45 +0000
commitb2c0ddf033fbf143539ad8a7630747a0e866e4fc (patch)
tree2aae48e00aa7d4951e711ebb667d8f37e0c8a6d0 /activerecord/test/threaded_connections_test.rb
parentdd5397a57c39da78f22e0fec517ff6e5ede7628a (diff)
downloadrails-b2c0ddf033fbf143539ad8a7630747a0e866e4fc.tar.gz
rails-b2c0ddf033fbf143539ad8a7630747a0e866e4fc.tar.bz2
rails-b2c0ddf033fbf143539ad8a7630747a0e866e4fc.zip
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
Diffstat (limited to 'activerecord/test/threaded_connections_test.rb')
-rw-r--r--activerecord/test/threaded_connections_test.rb34
1 files changed, 18 insertions, 16 deletions
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