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

Merge pull request #22038 from tgxworld/fix_random_error_when_running_tests_with_jruby

FIX: Randomly failing test when running without GIL.
This commit is contained in:
Kasper Timm Hansen 2015-10-23 15:54:48 +02:00
commit 6f62ace65a

View file

@ -388,8 +388,14 @@ module ActionController
end
def test_exception_callback_when_committed
current_threads = Thread.list
capture_log_output do |output|
get :exception_with_callback, format: 'text/event-stream'
# Wait on the execution of all threads
(Thread.list - current_threads).each(&:join)
assert_equal %(data: "500 Internal Server Error"\n\n), response.body
assert_match 'An exception occurred...', output.rewind && output.read
assert_stream_closed