diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2015-10-23 15:54:48 +0200 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2015-10-23 15:54:48 +0200 |
commit | 6f62ace65a720f515da82f5fc5f3e7eab1df8658 (patch) | |
tree | da87315a5bde1cd63757f920853f711ab6ff7bfe /actionpack | |
parent | e81719650a119971e3265af866c1b47f027fa896 (diff) | |
parent | c285bbec17e845c2d5efca55c510983f6cc9456c (diff) | |
download | rails-6f62ace65a720f515da82f5fc5f3e7eab1df8658.tar.gz rails-6f62ace65a720f515da82f5fc5f3e7eab1df8658.tar.bz2 rails-6f62ace65a720f515da82f5fc5f3e7eab1df8658.zip |
Merge pull request #22038 from tgxworld/fix_random_error_when_running_tests_with_jruby
FIX: Randomly failing test when running without GIL.
Diffstat (limited to 'actionpack')
-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 |