mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Fix test/cases/connection_pool_test.rb for sqlite3 in-memory db
This commit is contained in:
@@ -6,6 +6,16 @@ module ActiveRecord
|
||||
def setup
|
||||
# Keep a duplicate pool so we do not bother others
|
||||
@pool = ConnectionPool.new ActiveRecord::Base.connection_pool.spec
|
||||
|
||||
if in_memory_db?
|
||||
# Separate connections to an in-memory database create an entirely new database,
|
||||
# with an empty schema etc, so we just stub out this schema on the fly.
|
||||
@pool.with_connection do |connection|
|
||||
connection.create_table :posts do |t|
|
||||
t.integer :cololumn
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def test_pool_caches_columns
|
||||
|
||||
Reference in New Issue
Block a user