diff options
author | Guo Xiang Tan <tgx_world@hotmail.com> | 2015-10-23 14:33:33 +0800 |
---|---|---|
committer | Guo Xiang Tan <tgx_world@hotmail.com> | 2015-10-23 21:15:51 +0800 |
commit | c285bbec17e845c2d5efca55c510983f6cc9456c (patch) | |
tree | e4cae1a5bcfbe44d2fffaa57f8ca15084915f81d /actionpack/test/controller | |
parent | b9d1e101b4982dd9c9359b2824589c3783effa26 (diff) | |
download | rails-c285bbec17e845c2d5efca55c510983f6cc9456c.tar.gz rails-c285bbec17e845c2d5efca55c510983f6cc9456c.tar.bz2 rails-c285bbec17e845c2d5efca55c510983f6cc9456c.zip |
FIX: Randomly failing test when running without GIL.
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/live_stream_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/controller/live_stream_test.rb b/actionpack/test/controller/live_stream_test.rb index 4d1c23cbee..4224ac2a1b 100644 --- a/actionpack/test/controller/live_stream_test.rb +++ b/actionpack/test/controller/live_stream_test.rb @@ -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 |