diff --git a/spec/redis_pooled_client_spec.cr b/spec/redis_pooled_client_spec.cr index ad88adc..939ff0c 100644 --- a/spec/redis_pooled_client_spec.cr +++ b/spec/redis_pooled_client_spec.cr @@ -13,7 +13,7 @@ describe Redis::PooledClient do client.pool.checkout client.pool.checkout - expect_raises(Redis::PoolTimeoutError, "No free connection (used 2 of 2) after timeout of 00:00:00.010000000s") do + expect_raises(Redis::PoolTimeoutError, "No free connection (used 2 of 2) after timeout of 0.01s") do client.get("bla") end end diff --git a/src/redis/pooled_client.cr b/src/redis/pooled_client.cr index 918141d..1ba9508 100644 --- a/src/redis/pooled_client.cr +++ b/src/redis/pooled_client.cr @@ -42,7 +42,7 @@ class Redis::PooledClient conn = begin @pool.checkout rescue IO::TimeoutError - raise Redis::PoolTimeoutError.new("No free connection (used #{@pool.size} of #{@pool.capacity}) after timeout of #{@pool.timeout}s") + raise Redis::PoolTimeoutError.new("No free connection (used #{@pool.size} of #{@pool.capacity}) after timeout of #{@pool.timeout.to_f}s") end begin