Skip to content

Commit

Permalink
Added bunny read timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Feb 16, 2016
1 parent b7f7dac commit a4a2809
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,13 @@ Bonus
### bunny

```ruby
Bunny.new(connection_timeout: 1, ...)
Bunny.new(connection_timeout: 1, read_timeout: 1, ...)
```

Raises `Bunny::TCPConnectionFailedForAllHosts` on connect timeout
Raises

TODO read timeout
- `Bunny::TCPConnectionFailedForAllHosts` on connect timeout
- `Bunny::NetworkFailure` on read timeout

### connection_pool

Expand Down
6 changes: 6 additions & 0 deletions test/bunny_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,10 @@ def test_connect
Bunny.new(host: connect_host, connection_timeout: 1).start
end
end

def test_read
assert_timeout(Bunny::NetworkFailure) do
Bunny.new(host: read_host, port: read_port, read_timeout: 1, automatically_recover: false).start
end
end
end

0 comments on commit a4a2809

Please sign in to comment.