lostisland / faraday

Simple, but flexible HTTP client library, with support for multiple backends.
https://lostisland.github.io/faraday
MIT License
5.72k stars 972 forks source link

Enforce timeouts in Faraday's test adapter #1465

Closed dpep closed 1 year ago

dpep commented 1 year ago

Description

Upgrade faraday's test adapter to enforce connection timeouts. Inspired by the faraday-rack implementation.

olleolleolle commented 1 year ago

(This is a super-cool PR, @dpep, the tests run after linting passes.)

``` Offenses: lib/faraday/adapter/test.rb:283:11: C: [Correctable] Layout/IndentationWidth: Use 2 (not -7) spaces for indentation. ([https://rubystyle.guide#spaces-indentation](https://rubystyle.guide/#spaces-indentation)) [env, meta].take(block_arity) ^^^^^^^ lib/faraday/adapter/test.rb:284:9: C: [Correctable] Layout/ElseAlignment: Align else with if. else ^^^^ lib/faraday/adapter/test.rb:286:9: W: [Correctable] Layout/EndAlignment: end at 286, 8 is not aligned with if at 282, 17. end ^^^ lib/faraday/adapter/test.rb:300:1: C: [Correctable] Layout/EmptyLines: Extra blank line detected. ([https://rubystyle.guide#two-or-more-empty-lines](https://rubystyle.guide/#two-or-more-empty-lines)) 75 files inspected, 4 offenses detected, 4 offenses autocorrectable Error: Process completed with exit code 1. ``` Linting complaints
tilo commented 1 year ago

good work, @dpep! :