Skip to content

Commit

Permalink
Change default http_open_timeout to 2 seconds (from 15 seconds) (#17)
Browse files Browse the repository at this point in the history
* change default http_open_timeout to 2 seconds (from 15 seconds)

* bump minor version
  • Loading branch information
Martin Kang authored Feb 2, 2021
1 parent 845399f commit 855d9ca
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Journaling provides a number of different configuation options that can be set i
The number of seconds a persistent connection is allowed to sit idle before it should no longer be used.
#### `Journaled.http_open_timeout` (default: 15 seconds)
#### `Journaled.http_open_timeout` (default: 2 seconds)
The number of seconds before the :http_handler should timeout while trying to open a new HTTP session.
Expand Down
2 changes: 1 addition & 1 deletion lib/journaled.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module Journaled
mattr_accessor :default_app_name
mattr_accessor(:job_priority) { 20 }
mattr_accessor(:http_idle_timeout) { 5 }
mattr_accessor(:http_open_timeout) { 15 }
mattr_accessor(:http_open_timeout) { 2 }
mattr_accessor(:http_read_timeout) { 60 }

def development_or_test?
Expand Down
2 changes: 1 addition & 1 deletion lib/journaled/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Journaled
VERSION = "2.4.0".freeze
VERSION = "2.5.0".freeze
end
6 changes: 3 additions & 3 deletions spec/models/journaled/delivery_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
end

it "will set http_open_timeout by default" do
expect(subject.kinesis_client_config).to include(http_open_timeout: 15)
expect(subject.kinesis_client_config).to include(http_open_timeout: 2)
end

it "will set http_read_timeout by default" do
Expand All @@ -207,8 +207,8 @@

context "when Journaled.http_open_timeout is specified" do
it "will set http_open_timeout by specified value" do
allow(Journaled).to receive(:http_open_timeout).and_return(2)
expect(subject.kinesis_client_config).to include(http_open_timeout: 2)
allow(Journaled).to receive(:http_open_timeout).and_return(1)
expect(subject.kinesis_client_config).to include(http_open_timeout: 1)
end
end

Expand Down

0 comments on commit 855d9ca

Please sign in to comment.