bunny 2.6.3 → 2.6.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +7 -3
  3. data/ChangeLog.md +23 -2
  4. data/Gemfile +3 -3
  5. data/LICENSE +1 -1
  6. data/README.md +2 -2
  7. data/lib/bunny/channel.rb +1 -1
  8. data/lib/bunny/channel_id_allocator.rb +3 -3
  9. data/lib/bunny/concurrent/continuation_queue.rb +9 -5
  10. data/lib/bunny/exceptions.rb +6 -0
  11. data/lib/bunny/session.rb +69 -11
  12. data/lib/bunny/transport.rb +1 -1
  13. data/lib/bunny/version.rb +1 -1
  14. data/spec/higher_level_api/integration/basic_ack_spec.rb +46 -46
  15. data/spec/higher_level_api/integration/basic_cancel_spec.rb +13 -13
  16. data/spec/higher_level_api/integration/basic_consume_spec.rb +40 -40
  17. data/spec/higher_level_api/integration/basic_consume_with_objects_spec.rb +5 -5
  18. data/spec/higher_level_api/integration/basic_get_spec.rb +5 -5
  19. data/spec/higher_level_api/integration/basic_nack_spec.rb +13 -13
  20. data/spec/higher_level_api/integration/basic_publish_spec.rb +7 -7
  21. data/spec/higher_level_api/integration/basic_qos_spec.rb +1 -1
  22. data/spec/higher_level_api/integration/basic_reject_spec.rb +23 -23
  23. data/spec/higher_level_api/integration/basic_return_spec.rb +3 -3
  24. data/spec/higher_level_api/integration/channel_close_spec.rb +1 -1
  25. data/spec/higher_level_api/integration/channel_open_spec.rb +1 -1
  26. data/spec/higher_level_api/integration/connection_recovery_spec.rb +93 -55
  27. data/spec/higher_level_api/integration/connection_spec.rb +46 -46
  28. data/spec/higher_level_api/integration/connection_stop_spec.rb +9 -8
  29. data/spec/higher_level_api/integration/consumer_cancellation_notification_spec.rb +14 -14
  30. data/spec/higher_level_api/integration/dead_lettering_spec.rb +8 -8
  31. data/spec/higher_level_api/integration/exchange_bind_spec.rb +4 -4
  32. data/spec/higher_level_api/integration/exchange_declare_spec.rb +10 -10
  33. data/spec/higher_level_api/integration/exchange_delete_spec.rb +1 -1
  34. data/spec/higher_level_api/integration/exchange_unbind_spec.rb +3 -3
  35. data/spec/higher_level_api/integration/exclusive_queue_spec.rb +5 -5
  36. data/spec/higher_level_api/integration/heartbeat_spec.rb +4 -4
  37. data/spec/higher_level_api/integration/merry_go_round_spec.rb +10 -10
  38. data/spec/higher_level_api/integration/message_properties_access_spec.rb +22 -22
  39. data/spec/higher_level_api/integration/predeclared_exchanges_spec.rb +1 -1
  40. data/spec/higher_level_api/integration/publisher_confirms_spec.rb +8 -8
  41. data/spec/higher_level_api/integration/publishing_edge_cases_spec.rb +10 -10
  42. data/spec/higher_level_api/integration/queue_bind_spec.rb +10 -10
  43. data/spec/higher_level_api/integration/queue_declare_spec.rb +14 -11
  44. data/spec/higher_level_api/integration/queue_delete_spec.rb +1 -1
  45. data/spec/higher_level_api/integration/queue_purge_spec.rb +3 -3
  46. data/spec/higher_level_api/integration/queue_unbind_spec.rb +4 -4
  47. data/spec/higher_level_api/integration/read_only_consumer_spec.rb +7 -7
  48. data/spec/higher_level_api/integration/sender_selected_distribution_spec.rb +6 -6
  49. data/spec/higher_level_api/integration/tls_connection_spec.rb +40 -40
  50. data/spec/higher_level_api/integration/tx_commit_spec.rb +1 -1
  51. data/spec/higher_level_api/integration/tx_rollback_spec.rb +1 -1
  52. data/spec/higher_level_api/integration/with_channel_spec.rb +1 -1
  53. data/spec/issues/issue100_spec.rb +7 -7
  54. data/spec/issues/issue141_spec.rb +3 -3
  55. data/spec/issues/issue224_spec.rb +3 -3
  56. data/spec/issues/issue465_spec.rb +32 -0
  57. data/spec/issues/issue78_spec.rb +11 -10
  58. data/spec/issues/issue83_spec.rb +1 -1
  59. data/spec/issues/issue97_spec.rb +20 -20
  60. data/spec/stress/channel_close_stress_spec.rb +3 -3
  61. data/spec/stress/channel_open_stress_spec.rb +3 -3
  62. data/spec/stress/channel_open_stress_with_single_threaded_connection_spec.rb +2 -1
  63. data/spec/stress/concurrent_consumers_stress_spec.rb +6 -6
  64. data/spec/stress/concurrent_publishers_stress_spec.rb +2 -1
  65. data/spec/stress/connection_open_close_spec.rb +3 -3
  66. data/spec/stress/long_running_consumer_spec.rb +7 -5
  67. data/spec/unit/concurrent/condition_spec.rb +5 -5
  68. metadata +4 -6
  69. data/spec/higher_level_api/integration/basic_recover_spec.rb +0 -18
  70. data/spec/higher_level_api/integration/consistent_hash_exchange_spec.rb +0 -59
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  describe Bunny::Exchange do
4
4
  let(:connection) do
5
- c = Bunny.new(:user => "bunny_gem", :password => "bunny_password", :vhost => "bunny_testbed")
5
+ c = Bunny.new(username: "bunny_gem", password: "bunny_password", vhost: "bunny_testbed")
6
6
  c.start
7
7
  c
8
8
  end
@@ -14,10 +14,10 @@ describe Bunny::Exchange do
14
14
  it "binds two existing exchanges" do
15
15
  ch = connection.create_channel
16
16
 
17
- source = ch.fanout("bunny.exchanges.source", :auto_delete => true)
18
- destination = ch.fanout("bunny.exchanges.destination", :auto_delete => true)
17
+ source = ch.fanout("bunny.exchanges.source", auto_delete: true)
18
+ destination = ch.fanout("bunny.exchanges.destination", auto_delete: true)
19
19
 
20
- queue = ch.queue("", :exclusive => true)
20
+ queue = ch.queue("", exclusive: true)
21
21
  queue.bind(destination)
22
22
 
23
23
  destination.bind(source)
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  describe Bunny::Exchange do
4
4
  let(:connection) do
5
- c = Bunny.new(:user => "bunny_gem", :password => "bunny_password", :vhost => "bunny_testbed")
5
+ c = Bunny.new(username: "bunny_gem", password: "bunny_password", vhost: "bunny_testbed")
6
6
  c.start
7
7
  c
8
8
  end
@@ -67,7 +67,7 @@ describe Bunny::Exchange do
67
67
  ch = connection.create_channel
68
68
 
69
69
  name = "bunny.tests.exchanges.durable"
70
- x = ch.fanout(name, :durable => true)
70
+ x = ch.fanout(name, durable: true)
71
71
  expect(x.name).to eq name
72
72
  expect(x).to be_durable
73
73
  expect(x).not_to be_auto_delete
@@ -83,12 +83,12 @@ describe Bunny::Exchange do
83
83
  ch = connection.create_channel
84
84
 
85
85
  name = "bunny.tests.exchanges.auto-delete"
86
- x = ch.fanout(name, :auto_delete => true)
86
+ x = ch.fanout(name, auto_delete: true)
87
87
  expect(x.name).to eq name
88
88
  expect(x).not_to be_durable
89
89
  expect(x).to be_auto_delete
90
90
 
91
- ch.exchange(name, :type => :fanout, :auto_delete => true)
91
+ ch.exchange(name, type: :fanout, auto_delete: true)
92
92
 
93
93
  x.delete
94
94
  ch.close
@@ -100,15 +100,15 @@ describe Bunny::Exchange do
100
100
  it "raises an exception" do
101
101
  ch = connection.create_channel
102
102
 
103
- x = ch.fanout("bunny.tests.exchanges.fanout", :auto_delete => true, :durable => false)
103
+ x = ch.fanout("bunny.tests.exchanges.fanout", auto_delete: true, durable: false)
104
104
  expect {
105
105
  # force re-declaration
106
- ch.exchange_declare("bunny.tests.exchanges.fanout", :direct, :auto_delete => false, :durable => true)
106
+ ch.exchange_declare("bunny.tests.exchanges.fanout", :direct, auto_delete: false, durable: true)
107
107
  }.to raise_error(Bunny::PreconditionFailed)
108
108
 
109
109
  expect(ch).to be_closed
110
110
  expect {
111
- ch.fanout("bunny.tests.exchanges.fanout", :auto_delete => true, :durable => false)
111
+ ch.fanout("bunny.tests.exchanges.fanout", auto_delete: true, durable: false)
112
112
  }.to raise_error(Bunny::ChannelAlreadyClosed)
113
113
  end
114
114
  end
@@ -123,7 +123,7 @@ describe Bunny::Exchange do
123
123
  x = ch.direct(name)
124
124
  expect(x.name).to eq name
125
125
 
126
- ch.exchange(name, :type => :direct)
126
+ ch.exchange(name, type: :direct)
127
127
 
128
128
  x.delete
129
129
  ch.close
@@ -152,7 +152,7 @@ describe Bunny::Exchange do
152
152
  x = ch.topic(name)
153
153
  expect(x.name).to eq name
154
154
 
155
- ch.exchange(name, :type => :topic)
155
+ ch.exchange(name, type: :topic)
156
156
 
157
157
  x.delete
158
158
  ch.close
@@ -215,7 +215,7 @@ describe Bunny::Exchange do
215
215
  context "that is internal" do
216
216
  it "can be declared" do
217
217
  ch = connection.create_channel
218
- x = ch.fanout("bunny.tests.exchanges.internal", :internal => true)
218
+ x = ch.fanout("bunny.tests.exchanges.internal", internal: true)
219
219
  expect(x).to be_internal
220
220
  x.delete
221
221
 
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  describe Bunny::Exchange, "#delete" do
4
4
  let(:connection) do
5
- c = Bunny.new(:user => "bunny_gem", :password => "bunny_password", :vhost => "bunny_testbed")
5
+ c = Bunny.new(username: "bunny_gem", password: "bunny_password", vhost: "bunny_testbed")
6
6
  c.start
7
7
  c
8
8
  end
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  describe Bunny::Exchange do
4
4
  let(:connection) do
5
- c = Bunny.new(:user => "bunny_gem", :password => "bunny_password", :vhost => "bunny_testbed")
5
+ c = Bunny.new(username: "bunny_gem", password: "bunny_password", vhost: "bunny_testbed")
6
6
  c.start
7
7
  c
8
8
  end
@@ -17,7 +17,7 @@ describe Bunny::Exchange do
17
17
  source = ch.fanout("bunny.exchanges.source#{rand}")
18
18
  destination = ch.fanout("bunny.exchanges.destination#{rand}")
19
19
 
20
- queue = ch.queue("", :exclusive => true)
20
+ queue = ch.queue("", exclusive: true)
21
21
  queue.bind(destination)
22
22
 
23
23
  destination.bind(source)
@@ -25,7 +25,7 @@ describe Bunny::Exchange do
25
25
  sleep 0.5
26
26
 
27
27
  expect(queue.message_count).to eq 1
28
- queue.pop(:manual_ack => true)
28
+ queue.pop(manual_ack: true)
29
29
 
30
30
  destination.unbind(source)
31
31
  source.publish("")
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  describe Bunny::Queue do
4
4
  let(:connection) do
5
- c = Bunny.new(:user => "bunny_gem", :password => "bunny_password", :vhost => "bunny_testbed")
5
+ c = Bunny.new(username: "bunny_gem", password: "bunny_password", vhost: "bunny_testbed")
6
6
  c.start
7
7
  c
8
8
  end
@@ -14,13 +14,13 @@ describe Bunny::Queue do
14
14
  it "is closed when the connection it was declared on is closed" do
15
15
  ch1 = connection.create_channel
16
16
  ch2 = connection.create_channel
17
- q = ch1.queue("", :exclusive => true)
17
+ q = ch1.queue("", exclusive: true)
18
18
 
19
- ch1.queue_declare(q.name, :passive => true)
20
- ch2.queue_declare(q.name, :passive => true)
19
+ ch1.queue_declare(q.name, passive: true)
20
+ ch2.queue_declare(q.name, passive: true)
21
21
 
22
22
  ch1.close
23
- ch2.queue_declare(q.name, :passive => true)
23
+ ch2.queue_declare(q.name, passive: true)
24
24
 
25
25
  ch2.queue_delete(q.name)
26
26
  ch2.close
@@ -3,7 +3,7 @@ require "spec_helper"
3
3
  describe "Client-defined heartbeat interval" do
4
4
  context "with value > 0" do
5
5
  let(:connection) do
6
- c = Bunny.new(:user => "bunny_gem", :password => "bunny_password", :vhost => "bunny_testbed", :heartbeat_interval => 4)
6
+ c = Bunny.new(username: "bunny_gem", password: "bunny_password", vhost: "bunny_testbed", heartbeat_interval: 4)
7
7
  c.start
8
8
  c
9
9
  end
@@ -18,8 +18,8 @@ describe "Client-defined heartbeat interval" do
18
18
  # issue 267
19
19
  context "with value = 0" do
20
20
  let(:connection) do
21
- c = Bunny.new(:user => "bunny_gem", :password => "bunny_password", :vhost => "bunny_testbed",
22
- :heartbeat_interval => 0, :automatically_recover => false)
21
+ c = Bunny.new(username: "bunny_gem", password: "bunny_password", vhost: "bunny_testbed",
22
+ heartbeat_interval: 0, automatically_recover: false)
23
23
  c.start
24
24
  c
25
25
  end
@@ -35,7 +35,7 @@ end
35
35
 
36
36
  describe "Server-defined heartbeat interval" do
37
37
  let(:connection) do
38
- c = Bunny.new(:user => "bunny_gem", :password => "bunny_password", :vhost => "bunny_testbed", :heartbeat_interval => :server)
38
+ c = Bunny.new(username: "bunny_gem", password: "bunny_password", vhost: "bunny_testbed", heartbeat_interval: :server)
39
39
  c.start
40
40
  c
41
41
  end
@@ -2,31 +2,31 @@ require "spec_helper"
2
2
 
3
3
  describe "A message that is proxied by multiple intermediate consumers" do
4
4
  let(:c1) do
5
- c = Bunny.new(:user => "bunny_gem", :password => "bunny_password", :vhost => "bunny_testbed")
5
+ c = Bunny.new(username: "bunny_gem", password: "bunny_password", vhost: "bunny_testbed")
6
6
  c.start
7
7
  c
8
8
  end
9
9
 
10
10
  let(:c2) do
11
- c = Bunny.new(:user => "bunny_gem", :password => "bunny_password", :vhost => "bunny_testbed")
11
+ c = Bunny.new(username: "bunny_gem", password: "bunny_password", vhost: "bunny_testbed")
12
12
  c.start
13
13
  c
14
14
  end
15
15
 
16
16
  let(:c3) do
17
- c = Bunny.new(:user => "bunny_gem", :password => "bunny_password", :vhost => "bunny_testbed")
17
+ c = Bunny.new(username: "bunny_gem", password: "bunny_password", vhost: "bunny_testbed")
18
18
  c.start
19
19
  c
20
20
  end
21
21
 
22
22
  let(:c4) do
23
- c = Bunny.new(:user => "bunny_gem", :password => "bunny_password", :vhost => "bunny_testbed")
23
+ c = Bunny.new(username: "bunny_gem", password: "bunny_password", vhost: "bunny_testbed")
24
24
  c.start
25
25
  c
26
26
  end
27
27
 
28
28
  let(:c5) do
29
- c = Bunny.new(:user => "bunny_gem", :password => "bunny_password", :vhost => "bunny_testbed")
29
+ c = Bunny.new(username: "bunny_gem", password: "bunny_password", vhost: "bunny_testbed")
30
30
  c.start
31
31
  c
32
32
  end
@@ -45,25 +45,25 @@ describe "A message that is proxied by multiple intermediate consumers" do
45
45
  xs = []
46
46
 
47
47
  ch1 = c1.create_channel
48
- q1 = ch1.queue("", :exclusive => true)
48
+ q1 = ch1.queue("", exclusive: true)
49
49
  q1.subscribe do |_, _, payload|
50
50
  xs << payload
51
51
  end
52
52
 
53
53
  ch2 = c2.create_channel
54
- q2 = ch2.queue("", :exclusive => true)
54
+ q2 = ch2.queue("", exclusive: true)
55
55
  q2.subscribe do |_, _, payload|
56
56
  q1.publish(payload)
57
57
  end
58
58
 
59
59
  ch3 = c3.create_channel
60
- q3 = ch2.queue("", :exclusive => true)
60
+ q3 = ch2.queue("", exclusive: true)
61
61
  q3.subscribe do |_, _, payload|
62
62
  q2.publish(payload)
63
63
  end
64
64
 
65
65
  ch4 = c4.create_channel
66
- q4 = ch2.queue("", :exclusive => true)
66
+ q4 = ch2.queue("", exclusive: true)
67
67
  q4.subscribe do |_, _, payload|
68
68
  q3.publish(payload)
69
69
  end
@@ -72,7 +72,7 @@ describe "A message that is proxied by multiple intermediate consumers" do
72
72
  x = ch5.default_exchange
73
73
 
74
74
  n.times do |i|
75
- x.publish("msg #{i}", :routing_key => q4.name)
75
+ x.publish("msg #{i}", routing_key: q4.name)
76
76
  end
77
77
 
78
78
  t = n / 1000 * 3.0
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  describe Bunny::Queue, "#subscribe" do
4
4
  let(:connection) do
5
- c = Bunny.new(:user => "bunny_gem", :password => "bunny_password", :vhost => "bunny_testbed")
5
+ c = Bunny.new(username: "bunny_gem", password: "bunny_password", vhost: "bunny_testbed")
6
6
  c.start
7
7
  c
8
8
  end
@@ -20,8 +20,8 @@ describe Bunny::Queue, "#subscribe" do
20
20
 
21
21
  t = Thread.new do
22
22
  ch = connection.create_channel
23
- q = ch.queue(queue_name, :auto_delete => true, :durable => false)
24
- q.subscribe(:exclusive => true, :manual_ack => false) do |delivery_info, properties, payload|
23
+ q = ch.queue(queue_name, auto_delete: true, durable: false)
24
+ q.subscribe(exclusive: true, manual_ack: false) do |delivery_info, properties, payload|
25
25
  metadata = properties
26
26
  envelope = delivery_info
27
27
  end
@@ -32,28 +32,28 @@ describe Bunny::Queue, "#subscribe" do
32
32
  ch = connection.create_channel
33
33
  x = ch.default_exchange
34
34
  x.publish("hello",
35
- :routing_key => queue_name,
36
- :app_id => "bunny.example",
37
- :priority => 8,
38
- :type => "kinda.checkin",
35
+ routing_key: queue_name,
36
+ app_id: "bunny.example",
37
+ priority: 8,
38
+ type: "kinda.checkin",
39
39
  # headers table keys can be anything
40
- :headers => {
41
- :coordinates => {
42
- :latitude => 59.35,
43
- :longitude => 18.066667
40
+ headers: {
41
+ coordinates: {
42
+ latitude: 59.35,
43
+ longitude: 18.066667
44
44
  },
45
- :time => @now,
46
- :participants => 11,
47
- :venue => "Stockholm",
48
- :true_field => true,
49
- :false_field => false,
50
- :nil_field => nil,
51
- :ary_field => ["one", 2.0, 3, [{"abc" => 123}]]
45
+ time: @now,
46
+ participants: 11,
47
+ venue: "Stockholm",
48
+ true_field: true,
49
+ false_field: false,
50
+ nil_field: nil,
51
+ ary_field: ["one", 2.0, 3, [{"abc" => 123}]]
52
52
  },
53
- :timestamp => @now.to_i,
54
- :reply_to => "a.sender",
55
- :correlation_id => "r-1",
56
- :message_id => "m-1")
53
+ timestamp: @now.to_i,
54
+ reply_to: "a.sender",
55
+ correlation_id: "r-1",
56
+ message_id: "m-1")
57
57
 
58
58
  sleep 0.7
59
59
 
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  describe "amq.* exchanges" do
4
4
  let(:connection) do
5
- c = Bunny.new(:user => "bunny_gem", :password => "bunny_password", :vhost => "bunny_testbed")
5
+ c = Bunny.new(username: "bunny_gem", password: "bunny_password", vhost: "bunny_testbed")
6
6
  c.start
7
7
  c
8
8
  end
@@ -16,11 +16,11 @@ describe Bunny::Channel do
16
16
  ch.confirm_select
17
17
  expect(ch).to be_using_publisher_confirmations
18
18
 
19
- q = ch.queue("", :exclusive => true)
19
+ q = ch.queue("", exclusive: true)
20
20
  x = ch.default_exchange
21
21
 
22
22
  n.times do
23
- x.publish("xyzzy", :routing_key => q.name)
23
+ x.publish("xyzzy", routing_key: q.name)
24
24
  end
25
25
 
26
26
  expect(ch.next_publish_seq_no).to eq n + 1
@@ -41,11 +41,11 @@ describe Bunny::Channel do
41
41
  ch.confirm_select
42
42
  expect(ch).to be_using_publisher_confirmations
43
43
 
44
- q = ch.queue("", :exclusive => true)
44
+ q = ch.queue("", exclusive: true)
45
45
  x = ch.default_exchange
46
46
 
47
47
  n.times do
48
- x.publish("xyzzy", :routing_key => q.name)
48
+ x.publish("xyzzy", routing_key: q.name)
49
49
  end
50
50
 
51
51
  expect(ch.next_publish_seq_no).to eq n + 1
@@ -82,11 +82,11 @@ describe Bunny::Channel do
82
82
  ch.confirm_select
83
83
  expect(ch).to be_using_publisher_confirmations
84
84
 
85
- q = ch.queue("", :exclusive => true)
85
+ q = ch.queue("", exclusive: true)
86
86
  x = ch.default_exchange
87
87
 
88
88
  n.times do
89
- x.publish("xyzzy", :routing_key => q.name)
89
+ x.publish("xyzzy", routing_key: q.name)
90
90
  end
91
91
 
92
92
  #be sneaky to simulate a nack
@@ -118,7 +118,7 @@ describe Bunny::Channel do
118
118
 
119
119
  context "with a multi-threaded connection" do
120
120
  let(:connection) do
121
- c = Bunny.new(:user => "bunny_gem", :password => "bunny_password", :vhost => "bunny_testbed", :continuation_timeout => 10000)
121
+ c = Bunny.new(username: "bunny_gem", password: "bunny_password", vhost: "bunny_testbed", continuation_timeout: 10000)
122
122
  c.start
123
123
  c
124
124
  end
@@ -181,7 +181,7 @@ describe Bunny::Channel do
181
181
 
182
182
  context "with a single-threaded connection" do
183
183
  let(:connection) do
184
- c = Bunny.new(:user => "bunny_gem", :password => "bunny_password", :vhost => "bunny_testbed", :continuation_timeout => 10000, :threaded => false)
184
+ c = Bunny.new(username: "bunny_gem", password: "bunny_password", vhost: "bunny_testbed", continuation_timeout: 10000, threaded: false)
185
185
  c.start
186
186
  c
187
187
  end
@@ -4,10 +4,10 @@ require "spec_helper"
4
4
  unless ENV["CI"]
5
5
  describe "Message framing implementation" do
6
6
  let(:connection) do
7
- c = Bunny.new(:user => "bunny_gem",
8
- :password => "bunny_password",
9
- :vhost => "bunny_testbed",
10
- :port => ENV.fetch("RABBITMQ_PORT", 5672))
7
+ c = Bunny.new(username: "bunny_gem",
8
+ password: "bunny_password",
9
+ vhost: "bunny_testbed",
10
+ port: ENV.fetch("RABBITMQ_PORT", 5672))
11
11
  c.start
12
12
  c
13
13
  end
@@ -21,11 +21,11 @@ unless ENV["CI"]
21
21
  it "successfully frames the message" do
22
22
  ch = connection.create_channel
23
23
 
24
- q = ch.queue("", :exclusive => true)
24
+ q = ch.queue("", exclusive: true)
25
25
  x = ch.default_exchange
26
26
 
27
27
  as = ("a" * (1024 * 1024 * 4 + 28237777))
28
- x.publish(as, :routing_key => q.name, :persistent => true)
28
+ x.publish(as, routing_key: q.name, persistent: true)
29
29
 
30
30
  sleep(1)
31
31
  expect(q.message_count).to eq 1
@@ -42,11 +42,11 @@ unless ENV["CI"]
42
42
  it "successfully frames the message" do
43
43
  ch = connection.create_channel
44
44
 
45
- q = ch.queue("", :exclusive => true)
45
+ q = ch.queue("", exclusive: true)
46
46
  x = ch.default_exchange
47
47
 
48
48
  as = "кириллца, йо" * (1024 * 1024)
49
- x.publish(as, :routing_key => q.name, :persistent => true)
49
+ x.publish(as, routing_key: q.name, persistent: true)
50
50
 
51
51
  sleep(1)
52
52
  expect(q.message_count).to eq 1
@@ -64,10 +64,10 @@ unless ENV["CI"]
64
64
  it "successfully publishes the message" do
65
65
  ch = connection.create_channel
66
66
 
67
- q = ch.queue("", :exclusive => true)
67
+ q = ch.queue("", exclusive: true)
68
68
  x = ch.default_exchange
69
69
 
70
- x.publish("", :routing_key => q.name, :persistent => false, :mandatory => true)
70
+ x.publish("", routing_key: q.name, persistent: false, mandatory: true)
71
71
 
72
72
  sleep(0.5)
73
73
  expect(q.message_count).to eq 1