Skip to content

Commit d752281

Browse files
committed
Fix websocket ping rebuild integration tests.
1 parent 04c9e2e commit d752281

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

spec/integration/integration_spec.rb

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,26 +137,30 @@ def wait_for_server
137137
start_server
138138

139139
queue.pop_with_timeout(10)
140-
expect(@reply_to).to be 1
140+
expect(@reply_to).to eq 1
141141
end
142142

143143
it 'rebuilds the websocket connection when dropped' do
144144
@reply_to = nil
145145
client.on :pong do |data|
146+
logger.info data
146147
@reply_to = data.reply_to
147148
if @reply_to == 1
148149
client.instance_variable_get(:@socket).close
150+
queue.push :close
149151
else
150-
expect(@reply_to).to be 2
152+
expect(@reply_to).to eq 2
151153
queue.push :pong
152154
client.stop!
153155
end
154156
end
155157

156158
start_server
157159

158-
queue.pop_with_timeout(10)
159-
queue.pop_with_timeout(10)
160+
4.times do |i|
161+
queue.pop_with_timeout(10)
162+
client.logger.info "Pop #{i}"
163+
end
160164
end
161165
end
162166

0 commit comments

Comments
 (0)