roqua-healthy 1.1.8 → 1.1.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2538fa7edc7b6c02be4a8460cdcd60bfaef74dff
4
- data.tar.gz: f8c1b136292a2e0c94ccd6e96a73121b791ecb26
3
+ metadata.gz: 964fbac85a2be76b1cef6c67dbbc3709263bd075
4
+ data.tar.gz: 7ca7069b1a9f82c4bb8f219f2626c37373facc44
5
5
  SHA512:
6
- metadata.gz: a1c97ffcbdbe6467698ae2fc1d314a44c0deb90fa72d45f4012307964686d7bdb5b4880ae10a4d06fbc5bd9bab5981ec8578f1a6640609b96177f06e8260dc17
7
- data.tar.gz: 0e43ccf5a5973bc063406645e8e83e7143f7a1d8d1562414e2c745a5268962b21d029c19e17eb8c3251601048fb0e5d49e25ea81ddc253d20c81e0baf69ae8f3
6
+ metadata.gz: 5c90e5bcc6533683c1c3ebcd9b8b2b7c114bd45c077b673c02c80c7f4fcebe4895b311ca0b26c0a187af7de195dced3a5d6001d356de26df086ba814d33a019e
7
+ data.tar.gz: bcc1ab265d2aae32b9f3f391864c3fb53f0a51cc611b1b832bba5eef038e266e125a5bac1dcface2328327fe26e6976ca11de639ad20cb1f6ccc5c6121642d75
data/ChangeLog.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 1.1.9
2
+
3
+ * Handle upgraded mirth error messages
4
+
1
5
  ### 1.1.8
2
6
 
3
7
  * Handle new Impulse/User name format
@@ -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
 
@@ -1,6 +1,6 @@
1
1
  module Roqua
2
2
  module Healthy
3
3
  # healthy version
4
- VERSION = "1.1.8"
4
+ VERSION = "1.1.9"
5
5
  end
6
6
  end
@@ -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.8
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-09-01 00:00:00.000000000 Z
11
+ date: 2015-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport