1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

don't touch the response object until after we call get

This commit is contained in:
Aaron Patterson 2015-09-23 15:59:32 -07:00
parent d175ab2bd6
commit b5e36dd00a

View file

@ -281,10 +281,9 @@ module ActionController
@controller.latch = Concurrent::CountDownLatch.new
parts = ['hello', 'world']
@controller.request = @request
@controller.response = @response
get :blocking_stream
t = Thread.new(@response) { |resp|
t = Thread.new(response) { |resp|
resp.await_commit
resp.stream.each do |part|
assert_equal parts.shift, part
@ -294,8 +293,6 @@ module ActionController
end
}
@controller.process :blocking_stream
assert t.join(3), 'timeout expired before the thread terminated'
end