roqua-healthy 1.1.8 → 1.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ChangeLog.md +4 -0
- data/lib/roqua/healthy/a19/response_validator.rb +2 -2
- data/lib/roqua/healthy/version.rb +1 -1
- data/spec/unit/a19/fetcher_spec.rb +13 -3
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 964fbac85a2be76b1cef6c67dbbc3709263bd075
|
|
4
|
+
data.tar.gz: 7ca7069b1a9f82c4bb8f219f2626c37373facc44
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5c90e5bcc6533683c1c3ebcd9b8b2b7c114bd45c077b673c02c80c7f4fcebe4895b311ca0b26c0a187af7de195dced3a5d6001d356de26df086ba814d33a019e
|
|
7
|
+
data.tar.gz: bcc1ab265d2aae32b9f3f391864c3fb53f0a51cc611b1b832bba5eef038e266e125a5bac1dcface2328327fe26e6976ca11de639ad20cb1f6ccc5c6121642d75
|
data/ChangeLog.md
CHANGED
|
@@ -46,9 +46,9 @@ module Roqua
|
|
|
46
46
|
|
|
47
47
|
def validate_500
|
|
48
48
|
failure = parser.fetch("failure")
|
|
49
|
-
raise ::Roqua::Healthy::Timeout, failure["error"] if failure["error"] == "Timeout waiting for ACK"
|
|
49
|
+
raise ::Roqua::Healthy::Timeout, failure["error"] if failure["error"] == "Timeout waiting for ACK" || failure["error"] == 'ERROR: Timeout waiting for response'
|
|
50
50
|
raise ::Roqua::Healthy::Timeout, failure["error"] if failure["error"] == "Unable to connect to destination\tSocketTimeoutException\tconnect timed out"
|
|
51
|
-
raise ::Roqua::Healthy::ConnectionRefused, failure["error"] if failure["error"] == "Unable to connect to destination\tConnectException\tConnection refused"
|
|
51
|
+
raise ::Roqua::Healthy::ConnectionRefused, failure["error"] if failure["error"] == "Unable to connect to destination\tConnectException\tConnection refused" || failure["error"] == 'ERROR: ConnectException: Connection refused'
|
|
52
52
|
raise ::Roqua::Healthy::UnknownFailure, failure["error"]
|
|
53
53
|
end
|
|
54
54
|
|
|
@@ -12,7 +12,7 @@ describe Roqua::Healthy::A19::Fetcher do
|
|
|
12
12
|
|
|
13
13
|
it "raises when upstream does not return HTTP 200" do
|
|
14
14
|
stub_mirth_response "Request not successful", 500
|
|
15
|
-
expect { subject.fetch }.to raise_exception
|
|
15
|
+
expect { subject.fetch }.to raise_exception(Roqua::Healthy::IllegalMirthResponse)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
it 'raises when upstream responds with illegal XML' do
|
|
@@ -23,21 +23,31 @@ describe Roqua::Healthy::A19::Fetcher do
|
|
|
23
23
|
expect { subject.fetch }.to raise_error(Roqua::Healthy::IllegalMirthResponse)
|
|
24
24
|
end
|
|
25
25
|
|
|
26
|
-
it "raises upstream is returning 'Timeout waiting for ACK' messages" do
|
|
26
|
+
it "raises upstream is returning old style 'Timeout waiting for ACK' messages" do
|
|
27
27
|
stub_mirth_response "<failure><error>Timeout waiting for ACK</error></failure>", 500
|
|
28
28
|
expect { subject.fetch }.to raise_exception(Roqua::Healthy::Timeout)
|
|
29
29
|
end
|
|
30
30
|
|
|
31
|
+
it "raises upstream is returning new style 'Timeout waiting for response' messages" do
|
|
32
|
+
stub_mirth_response "<failure><error>ERROR: Timeout waiting for response</error></failure>", 500
|
|
33
|
+
expect { subject.fetch }.to raise_exception(Roqua::Healthy::Timeout)
|
|
34
|
+
end
|
|
35
|
+
|
|
31
36
|
it "raises upstream is returning 'connection timeout' messages" do
|
|
32
37
|
stub_mirth_response "<failure><error>Unable to connect to destination\tSocketTimeoutException\tconnect timed out</error></failure>", 500
|
|
33
38
|
expect { subject.fetch }.to raise_exception(Roqua::Healthy::Timeout)
|
|
34
39
|
end
|
|
35
40
|
|
|
36
|
-
it "raises upstream is returning 'connection refused' messages" do
|
|
41
|
+
it "raises if upstream is returning old style 'connection refused' messages" do
|
|
37
42
|
stub_mirth_response "<failure><error>Unable to connect to destination\tConnectException\tConnection refused</error></failure>", 500
|
|
38
43
|
expect { subject.fetch }.to raise_exception(Roqua::Healthy::ConnectionRefused)
|
|
39
44
|
end
|
|
40
45
|
|
|
46
|
+
it "raises if upstream is returning new style 'connection refused' messages" do
|
|
47
|
+
stub_mirth_response "<failure><error>ERROR: ConnectException: Connection refused</error></failure>", 500
|
|
48
|
+
expect { subject.fetch }.to raise_exception(Roqua::Healthy::ConnectionRefused)
|
|
49
|
+
end
|
|
50
|
+
|
|
41
51
|
it "raises when upstream does not accept connections" do
|
|
42
52
|
stub_mirth.to_raise Errno::ECONNREFUSED
|
|
43
53
|
expect { subject.fetch }.to raise_exception(Roqua::Healthy::ConnectionRefused)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: roqua-healthy
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Marten Veldthuis
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-
|
|
11
|
+
date: 2015-10-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|