Skip to content

Commit

Permalink
Merge branch '2.6.x-stable'
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelklishin committed Feb 27, 2017
2 parents 3b29d28 + 09d5327 commit ed965c2
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions spec/higher_level_api/integration/connection_recovery_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@
with_open do |c|
ch1 = c.create_channel
ch2 = c.create_channel
sleep 1.5
close_all_connections!
sleep 1.0
sleep 0.5
poll_until { channels.count == 2 }
expect(ch1).to be_open
expect(ch2).to be_open
Expand All @@ -43,8 +44,9 @@
with_open_multi_host do |c|
ch1 = c.create_channel
ch2 = c.create_channel
sleep 1.5
close_all_connections!
sleep 1.0
sleep 0.5
poll_until { channels.count == 2 }
expect(ch1).to be_open
expect(ch2).to be_open
Expand All @@ -55,8 +57,9 @@
with_open_multi_broken_host do |c|
ch1 = c.create_channel
ch2 = c.create_channel
sleep 1.5
close_all_connections!
sleep 1.0
sleep 0.5
poll_until { channels.count == 2 }
expect(ch1).to be_open
expect(ch2).to be_open
Expand All @@ -69,7 +72,9 @@
ch.prefetch(11)
expect(ch.prefetch_count).to eq 11
expect(ch.prefetch_global).to be false
sleep 1.5
close_all_connections!
sleep 0.5
wait_for_recovery_with { connections.any? }
expect(ch).to be_open
expect(ch.prefetch_count).to eq 11
Expand All @@ -83,7 +88,9 @@
ch.prefetch(42, true)
expect(ch.prefetch_count).to eq 42
expect(ch.prefetch_global).to be true
sleep 1.5
close_all_connections!
sleep 0.5
wait_for_recovery_with { connections.any? }
expect(ch).to be_open
expect(ch.prefetch_count).to eq 42
Expand All @@ -96,7 +103,9 @@
ch = c.create_channel
ch.confirm_select
expect(ch).to be_using_publisher_confirms
sleep 1.5
close_all_connections!
sleep 0.5
wait_for_recovery_with { connections.any? }
expect(ch).to be_open
expect(ch).to be_using_publisher_confirms
Expand All @@ -108,7 +117,9 @@
ch = c.create_channel
ch.tx_select
expect(ch).to be_using_tx
sleep 1.5
close_all_connections!
sleep 0.5
wait_for_recovery_with { connections.any? }
expect(ch).to be_open
expect(ch).to be_using_tx
Expand Down

0 comments on commit ed965c2

Please sign in to comment.