bunny 1.6.0 → 1.6.1
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/lib/bunny/channel.rb +2 -1
- data/lib/bunny/session.rb +1 -0
- data/lib/bunny/version.rb +1 -1
- data/spec/stress/channel_close_stress_spec.rb +64 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65fac851747ba831f48433378fbe43ddfb96c57a
|
4
|
+
data.tar.gz: 3065bffd94f02c19738ea1352f238c223f8f5f90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78bc0ff879a3d2d94b1f97c55dfb1524cfed7dce6ad37d8c7a32d442de9f2b547df3c05fc243e103c01a5c50558b6fafc7a8b2f7c56c62b6f3c942e42398ad31
|
7
|
+
data.tar.gz: 8aff7680586499e05cadf62da282b08b6866829e468c6aee4126a0da31de6773af93ed7299f36eab2e64c6f0d417b5a0a11984419f92835df6d66aec5f704f22
|
data/ChangeLog.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## Changes between Bunny 1.6.0 and 1.6.1
|
2
|
+
|
3
|
+
### Bunny::Session#with_channel Synchornisation Improvements
|
4
|
+
|
5
|
+
`Bunny::Session#with_channel` is now fully synchronised and won't run into `COMMAND_INVALID` errors
|
6
|
+
when used from multiple threads that share a connection.
|
7
|
+
|
8
|
+
|
1
9
|
## Changes between Bunny 1.5.0 and 1.6.0
|
2
10
|
|
3
11
|
### TLSv1 by Default
|
data/lib/bunny/channel.rb
CHANGED
data/lib/bunny/session.rb
CHANGED
data/lib/bunny/version.rb
CHANGED
@@ -0,0 +1,64 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe "Rapidly opening and closing lots of channels" do
|
4
|
+
before :all do
|
5
|
+
@connection = Bunny.new(:automatic_recovery => false).tap do |c|
|
6
|
+
c.start
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
after :all do
|
11
|
+
@connection.close
|
12
|
+
end
|
13
|
+
|
14
|
+
100.times do |i|
|
15
|
+
context "in a multi-threaded scenario A (take #{i})" do
|
16
|
+
let(:n) { 20 }
|
17
|
+
|
18
|
+
it "works correctly" do
|
19
|
+
ts = []
|
20
|
+
|
21
|
+
n.times do
|
22
|
+
t = Thread.new do
|
23
|
+
@connection.with_channel do |ch1|
|
24
|
+
q = ch1.queue("", :exclusive => true)
|
25
|
+
q.delete
|
26
|
+
ch1.close
|
27
|
+
end
|
28
|
+
|
29
|
+
ch2 = @connection.create_channel
|
30
|
+
ch2.close
|
31
|
+
end
|
32
|
+
t.abort_on_exception = true
|
33
|
+
ts << t
|
34
|
+
end
|
35
|
+
|
36
|
+
ts.each { |t| t.join }
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
100.times do |i|
|
42
|
+
context "in a multi-threaded scenario B (take #{i})" do
|
43
|
+
let(:n) { 20 }
|
44
|
+
|
45
|
+
it "works correctly" do
|
46
|
+
ts = []
|
47
|
+
|
48
|
+
n.times do
|
49
|
+
t = Thread.new do
|
50
|
+
3.times do
|
51
|
+
@connection.with_channel do |ch|
|
52
|
+
x = ch.topic('bunny.stress.topics.t2', :durable => false)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
t.abort_on_exception = true
|
57
|
+
ts << t
|
58
|
+
end
|
59
|
+
|
60
|
+
ts.each { |t| t.join }
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
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: 1.6.
|
4
|
+
version: 1.6.1
|
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: 2014-
|
15
|
+
date: 2014-11-06 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: amq-protocol
|
@@ -190,6 +190,7 @@ files:
|
|
190
190
|
- spec/lower_level_api/integration/basic_cancel_spec.rb
|
191
191
|
- spec/lower_level_api/integration/basic_consume_spec.rb
|
192
192
|
- spec/spec_helper.rb
|
193
|
+
- spec/stress/channel_close_stress_spec.rb
|
193
194
|
- spec/stress/channel_open_stress_spec.rb
|
194
195
|
- spec/stress/channel_open_stress_with_single_threaded_connection_spec.rb
|
195
196
|
- spec/stress/concurrent_consumers_stress_spec.rb
|
@@ -290,6 +291,7 @@ test_files:
|
|
290
291
|
- spec/lower_level_api/integration/basic_cancel_spec.rb
|
291
292
|
- spec/lower_level_api/integration/basic_consume_spec.rb
|
292
293
|
- spec/spec_helper.rb
|
294
|
+
- spec/stress/channel_close_stress_spec.rb
|
293
295
|
- spec/stress/channel_open_stress_spec.rb
|
294
296
|
- spec/stress/channel_open_stress_with_single_threaded_connection_spec.rb
|
295
297
|
- spec/stress/concurrent_consumers_stress_spec.rb
|