class ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::StatementPoolTest
Public Instance Methods
test_cache_is_per_pid()
click to toggle source
# File activerecord/test/cases/adapters/postgresql/statement_pool_test.rb, line 20 def test_cache_is_per_pid cache = StatementPool.new nil, 10 cache["foo"] = "bar" assert_equal "bar", cache["foo"] pid = fork { lookup = cache["foo"]; exit!(!lookup) } Process.waitpid pid assert $?.success?, "process should exit successfully" end
test_dealloc_does_not_raise_on_inactive_connection()
click to toggle source
# File activerecord/test/cases/adapters/postgresql/statement_pool_test.rb, line 35 def test_dealloc_does_not_raise_on_inactive_connection cache = StatementPool.new InactivePgConnection.new, 10 cache["foo"] = "bar" assert_nothing_raised { cache.clear } end