Skip to content

Commit

Permalink
fix spec
Browse files Browse the repository at this point in the history
  • Loading branch information
kostya committed Apr 15, 2023
1 parent 15c22e0 commit 249fecb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spec/redis_pooled_client_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/redis/pooled_client.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 249fecb

Please sign in to comment.