mirror of
https://gitea.invidious.io/iv-org/shard-crystal-db.git
synced 2024-08-15 00:53:32 +00:00
allow new connections right away if pool can be increased
This commit is contained in:
parent
56aa10c54d
commit
3a7c801ece
2 changed files with 13 additions and 0 deletions
|
@ -87,4 +87,14 @@ describe DB::Database do
|
|||
DummyDriver::DummyConnection.connections.size.should eq(2)
|
||||
end
|
||||
end
|
||||
|
||||
it "should allow new connections if pool can increased and retry is not allowed" do
|
||||
DummyDriver::DummyConnection.clear_connections
|
||||
DB.open "dummy://localhost:1027?initial_pool_size=1&max_pool_size=2&retry_attempts=0" do |db|
|
||||
db.query("stmt1")
|
||||
DummyDriver::DummyConnection.connections.size.should eq(1)
|
||||
db.query("stmt1")
|
||||
DummyDriver::DummyConnection.connections.size.should eq(2)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue