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:
parent
d175ab2bd6
commit
b5e36dd00a
1 changed files with 2 additions and 5 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue