Methods
T
Instance Public methods
test_cache_is_per_pid()
# File activerecord/test/cases/adapters/postgresql/statement_pool_test.rb, line 18
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()
# File activerecord/test/cases/adapters/postgresql/statement_pool_test.rb, line 33
def test_dealloc_does_not_raise_on_inactive_connection
  cache = StatementPool.new InactivePGconn.new, 10
  cache['foo'] = 'bar'
  assert_nothing_raised { cache.clear }
end