mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 01:58:41 -05:00
(POOLER-184) Pool manager retry and exit on failure
Adding a reconnect retry for redis, which by default would retry 10 times, for a total wait time of ~80 seconds
This commit is contained in:
parent
bdf77a9e33
commit
a35d66c606
3 changed files with 14 additions and 5 deletions
|
|
@ -25,6 +25,13 @@ describe 'GenericConnectionPool' do
|
|||
connection: 'connection'
|
||||
}}
|
||||
|
||||
it 'should error out when connection pool could not establish no nothing' do
|
||||
newsub = Vmpooler.redis_connection_pool("foo,bar", "1234", "fuba", 1, 1, metrics, 0)
|
||||
expect { newsub.with_metrics do |conn_pool_object|
|
||||
conn_pool_object.srem('foo', "bar")
|
||||
end }.to raise_error Redis::CannotConnectError
|
||||
end
|
||||
|
||||
it 'should return a connection object when grabbing one from the pool' do
|
||||
subject.with_metrics do |conn_pool_object|
|
||||
expect(conn_pool_object).to be(connection_object)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue