Skip to content

Commit

Permalink
Verify check_in not called
Browse files Browse the repository at this point in the history
  • Loading branch information
noodl committed Apr 25, 2023
1 parent b3a0115 commit 5106550
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions spec/lib/mysql_framework/connector_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,10 @@
end

describe 'connection pool error handling' do
before do
expect(subject).to_not receive(:check_in)
end

it 'does not add nil to the pool when full and an attempt is made to use it' do
conns = max_pool_size.times.map { subject.check_out }
expect { subject.query('select 1') }.to raise_error(RuntimeError)
Expand Down

0 comments on commit 5106550

Please sign in to comment.