-
Notifications
You must be signed in to change notification settings - Fork 960
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #278 from theasci/master
Added read_timeout and open_timeout options
- Loading branch information
Showing
5 changed files
with
109 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Feature: Supports the read timeout option | ||
In order to handle inappropriately slow response times | ||
As a developer | ||
I want my request to raise an exception after my specified read_timeout as elapsed | ||
|
||
Scenario: A long running response | ||
Given a remote service that returns '<h1>Some HTML</h1>' | ||
And that service is accessed at the path '/long_running_service.html' | ||
And that service takes 2 seconds to generate a response | ||
When I set my HTTParty read_timeout option to 1 | ||
And I call HTTParty#get with '/long_running_service.html' | ||
Then it should raise a Timeout::Error exception | ||
And I wait for the server to recover |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters