File: supports_read_timeout_option.feature

package info (click to toggle)
ruby-httparty 0.13.7-1%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 736 kB
  • sloc: ruby: 4,741; xml: 425; sh: 35; makefile: 11
file content (13 lines) | stat: -rw-r--r-- 640 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
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