fraggle 4.0.0.pre.2 → 4.0.0.pre.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/fraggle/client.rb +1 -3
- data/lib/fraggle/version.rb +1 -1
- data/test/fraggle_client_test.rb +10 -4
- metadata +4 -4
data/lib/fraggle/client.rb
CHANGED
@@ -157,8 +157,6 @@ module Fraggle
|
|
157
157
|
def resend(req, &blk)
|
158
158
|
send(req) do |e, err|
|
159
159
|
case err
|
160
|
-
when nil
|
161
|
-
blk.call(e, err)
|
162
160
|
when Connection::DisconnectedError
|
163
161
|
req.tag = nil
|
164
162
|
resend(req, &blk)
|
@@ -183,7 +181,7 @@ module Fraggle
|
|
183
181
|
else
|
184
182
|
blk.call(e, err)
|
185
183
|
end
|
186
|
-
|
184
|
+
else
|
187
185
|
blk.call(e, err)
|
188
186
|
end
|
189
187
|
end
|
data/lib/fraggle/version.rb
CHANGED
data/test/fraggle_client_test.rb
CHANGED
@@ -113,15 +113,21 @@ class FraggleClientTest < Test::Unit::TestCase
|
|
113
113
|
zero, zlog = request(V::SET, :rev => 0, :path => "/foo", :value => "bar")
|
114
114
|
c.idemp(zero, &zlog)
|
115
115
|
|
116
|
-
neg, nlog = request(V::SET, :rev => -1, :path => "/foo", :value => "bar")
|
117
|
-
c.idemp(neg, &nlog)
|
118
|
-
|
119
116
|
c.cn.close_connection
|
120
117
|
|
121
118
|
assert_equal [one], c.cn.sent
|
122
119
|
|
123
120
|
assert_equal [[nil, C::DisconnectedError.new("127.0.0.1:0")]], zlog.valid
|
124
|
-
|
121
|
+
end
|
122
|
+
|
123
|
+
def test_idemp_unhandled_error
|
124
|
+
req, log = request(V::SET, :path => "/foo", :value => "bar", :rev => Fraggle::Client::MaxInt64)
|
125
|
+
c.idemp(req, &log)
|
126
|
+
|
127
|
+
res = reply(req.tag, :err_code => E::OTHER)
|
128
|
+
c.cn.receive_response(res)
|
129
|
+
|
130
|
+
assert_equal [[nil, C::ResponseError.new(res)]], log.valid
|
125
131
|
end
|
126
132
|
|
127
133
|
###
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fraggle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1923831855
|
5
5
|
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 4
|
8
8
|
- 0
|
9
9
|
- 0
|
10
10
|
- pre
|
11
|
-
-
|
12
|
-
version: 4.0.0.pre.
|
11
|
+
- 3
|
12
|
+
version: 4.0.0.pre.3
|
13
13
|
platform: ruby
|
14
14
|
authors:
|
15
15
|
- Blake Mizerany
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2011-05-
|
20
|
+
date: 2011-05-09 00:00:00 -07:00
|
21
21
|
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|