bunny 2.2.1 → 2.2.2
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 +8 -0
- data/Gemfile +2 -2
- data/bunny.gemspec +1 -1
- data/lib/bunny/version.rb +1 -1
- data/spec/higher_level_api/integration/connection_recovery_spec.rb +9 -2
- data/spec/higher_level_api/integration/queue_declare_spec.rb +28 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cee8bb663b9c828e0e82293ad144c29119114e94
|
4
|
+
data.tar.gz: f1186b143dde46b7a64ca23dfe664ca2daf04d09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ef4487153f5b27349a6a93bf3248acbf3da3bbe8359ae786542fced024227bec545b23323cc939ec85e43da934891d98a50657b479ecd837b97062800c21cd1
|
7
|
+
data.tar.gz: 36698772a5428eb1c3ff7c5ce877c95529e93aaf207eab6afa8e068f161e9824841c852fbe9751a485d34bdc9e7b1d7d4b4e5d83eb59788c9e4544a06a480f03
|
data/ChangeLog.md
CHANGED
data/Gemfile
CHANGED
data/bunny.gemspec
CHANGED
data/lib/bunny/version.rb
CHANGED
@@ -63,27 +63,34 @@ unless ENV["CI"]
|
|
63
63
|
end
|
64
64
|
|
65
65
|
def ensure_queue_recovery(ch, q)
|
66
|
+
ch.confirm_select
|
66
67
|
q.purge
|
67
68
|
x = ch.default_exchange
|
68
69
|
x.publish("msg", :routing_key => q.name)
|
70
|
+
ch.wait_for_confirms
|
69
71
|
sleep 0.5
|
70
72
|
expect(q.message_count).to eq 1
|
71
73
|
q.purge
|
72
74
|
end
|
73
75
|
|
74
|
-
def ensure_queue_binding_recovery(x, q, routing_key = "")
|
76
|
+
def ensure_queue_binding_recovery(ch, x, q, routing_key = "")
|
77
|
+
ch.confirm_select
|
75
78
|
q.purge
|
76
79
|
x.publish("msg", :routing_key => routing_key)
|
80
|
+
ch.wait_for_confirms
|
77
81
|
sleep 0.5
|
78
82
|
expect(q.message_count).to eq 1
|
79
83
|
q.purge
|
80
84
|
end
|
81
85
|
|
82
86
|
def ensure_exchange_binding_recovery(ch, source, destination, routing_key = "")
|
87
|
+
ch.confirm_select
|
83
88
|
q = ch.queue("", :exclusive => true)
|
84
89
|
q.bind(destination, :routing_key => routing_key)
|
85
90
|
|
86
91
|
source.publish("msg", :routing_key => routing_key)
|
92
|
+
ch.wait_for_confirms
|
93
|
+
sleep 0.5
|
87
94
|
expect(q.message_count).to eq 1
|
88
95
|
q.delete
|
89
96
|
end
|
@@ -273,7 +280,7 @@ unless ENV["CI"]
|
|
273
280
|
|
274
281
|
wait_for_recovery
|
275
282
|
expect(ch).to be_open
|
276
|
-
ensure_queue_binding_recovery(x, q)
|
283
|
+
ensure_queue_binding_recovery(ch, x, q)
|
277
284
|
end
|
278
285
|
end
|
279
286
|
|
@@ -136,6 +136,34 @@ describe Bunny::Queue do
|
|
136
136
|
end
|
137
137
|
|
138
138
|
|
139
|
+
context "when queue is declared with priorities" do
|
140
|
+
let(:args) do
|
141
|
+
{"x-max-priority" => 5}
|
142
|
+
end
|
143
|
+
|
144
|
+
it "enables priority implementation" do
|
145
|
+
ch = connection.create_channel
|
146
|
+
ch.confirm_select
|
147
|
+
|
148
|
+
q = ch.queue("bunny.tests.queues.with-arguments.priority", :arguments => args, :exclusive => true)
|
149
|
+
expect(q.arguments).to eq args
|
150
|
+
|
151
|
+
q.publish("xyzzy")
|
152
|
+
ch.wait_for_confirms
|
153
|
+
sleep 0.1
|
154
|
+
|
155
|
+
# this test only does sanity checking,
|
156
|
+
# without trying to actually test prioritisation.
|
157
|
+
#
|
158
|
+
# added to guard against issues such as
|
159
|
+
# https://github.com/rabbitmq/rabbitmq-server/issues/488
|
160
|
+
expect(q.message_count).to eq 1
|
161
|
+
|
162
|
+
ch.close
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
|
139
167
|
describe "#queue_exists?" do
|
140
168
|
context "when a queue exists" do
|
141
169
|
it "returns true" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bunny
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Duncan
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2015-
|
15
|
+
date: 2015-12-17 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: amq-protocol
|
@@ -20,14 +20,14 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 2.0.
|
23
|
+
version: 2.0.1
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
27
27
|
requirements:
|
28
28
|
- - ">="
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
version: 2.0.
|
30
|
+
version: 2.0.1
|
31
31
|
description: Easy to use, feature complete Ruby client for RabbitMQ 3.3 and later
|
32
32
|
versions.
|
33
33
|
email:
|