diff options
author | Arthur Neves <arthurnn@gmail.com> | 2016-06-03 17:17:38 -0400 |
---|---|---|
committer | Arthur Neves <arthurnn@gmail.com> | 2016-06-03 17:17:53 -0400 |
commit | 66ebbc4952f6cfb37d719f63036441ef98149418 (patch) | |
tree | 462e78b0351e9ab719bc0a8dfe4a2eaee506d977 /activerecord/test/cases/adapters/sqlite3/statement_pool_test.rb | |
parent | 755f6bf3d3d568bc0af2c636be2f6df16c651eb1 (diff) | |
download | rails-66ebbc4952f6cfb37d719f63036441ef98149418.tar.gz rails-66ebbc4952f6cfb37d719f63036441ef98149418.tar.bz2 rails-66ebbc4952f6cfb37d719f63036441ef98149418.zip |
Dont re-define class SQLite3Adapter on test
We were declaring in a few tests, which depending of
the order load will cause an error, as the super class could change.
see https://github.com/rails/rails/commit/ac1c4e141b20c1067af2c2703db6e1b463b985da#commitcomment-17731383
Diffstat (limited to 'activerecord/test/cases/adapters/sqlite3/statement_pool_test.rb')
-rw-r--r-- | activerecord/test/cases/adapters/sqlite3/statement_pool_test.rb | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/activerecord/test/cases/adapters/sqlite3/statement_pool_test.rb b/activerecord/test/cases/adapters/sqlite3/statement_pool_test.rb index 559b951109..d9db690522 100644 --- a/activerecord/test/cases/adapters/sqlite3/statement_pool_test.rb +++ b/activerecord/test/cases/adapters/sqlite3/statement_pool_test.rb @@ -1,24 +1,20 @@ require 'cases/helper' -module ActiveRecord::ConnectionAdapters - class SQLite3Adapter - class StatementPoolTest < ActiveRecord::SQLite3TestCase - if Process.respond_to?(:fork) - def test_cache_is_per_pid +class SQLite3StatementPoolTest < ActiveRecord::SQLite3TestCase + if Process.respond_to?(:fork) + def test_cache_is_per_pid - cache = StatementPool.new(10) - cache['foo'] = 'bar' - assert_equal 'bar', cache['foo'] + cache = StatementPool.new(10) + cache['foo'] = 'bar' + assert_equal 'bar', cache['foo'] - pid = fork { - lookup = cache['foo']; - exit!(!lookup) - } + pid = fork { + lookup = cache['foo']; + exit!(!lookup) + } - Process.waitpid pid - assert $?.success?, 'process should exit successfully' - end - end + Process.waitpid pid + assert $?.success?, 'process should exit successfully' end end end |