mirror of
https://gitea.invidious.io/iv-org/shard-crystal-db.git
synced 2024-08-15 00:53:32 +00:00
default max_pool_size to 0 = unlimited
This commit is contained in:
parent
79ec638de4
commit
cd10dabba2
6 changed files with 19 additions and 7 deletions
|
@ -59,7 +59,7 @@ describe DB do
|
|||
end
|
||||
|
||||
it "should raise if the sole connection is been used" do
|
||||
with_dummy do |db|
|
||||
with_dummy "dummy://host?max_pool_size=1&checkout_timeout=0.5" do |db|
|
||||
db.query "1" do |rs|
|
||||
expect_raises DB::PoolTimeout do
|
||||
db.scalar "2"
|
||||
|
@ -68,6 +68,16 @@ describe DB do
|
|||
end
|
||||
end
|
||||
|
||||
it "should use 'unlimited' connections by default" do
|
||||
with_dummy "dummy://host?checkout_timeout=0.5" do |db|
|
||||
rs = [] of DB::ResultSet
|
||||
500.times do
|
||||
rs << db.query "1"
|
||||
end
|
||||
DummyDriver::DummyConnection.connections.size.should eq(500)
|
||||
end
|
||||
end
|
||||
|
||||
it "exec should return to pool" do
|
||||
with_dummy do |db|
|
||||
db.exec "foo"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue