From 022c8be2cfee97b76c38e5134aa223f62938d6bf Mon Sep 17 00:00:00 2001 From: Robin Dupret Date: Fri, 27 Feb 2015 14:16:48 +0100 Subject: Avoid parallelizing Action Pack's tests on Rubinius Since the `ForkingExecutor` class seems to be pretty slow on Rubinius due to DRb (c.f. http://git.io/xIVg), let's avoid running tests with it on this platform. Also, the `parallelize_me!` call make the suite to output a bunch of errors due to rubinius/rubinius#2934 since there are thread-safety problems with autoloading. --- actionpack/test/abstract_unit.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/test') diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb index 918589f916..f5dd9d76af 100644 --- a/actionpack/test/abstract_unit.rb +++ b/actionpack/test/abstract_unit.rb @@ -95,7 +95,7 @@ end module ActiveSupport class TestCase include ActionDispatch::DrawOnce - if ActiveSupport::Testing::Isolation.forking_env? && PROCESS_COUNT > 0 + if RUBY_ENGINE == "ruby" && PROCESS_COUNT > 0 parallelize_me! end end @@ -479,7 +479,7 @@ class ForkingExecutor end end -if ActiveSupport::Testing::Isolation.forking_env? && PROCESS_COUNT > 0 +if RUBY_ENGINE == "ruby" && PROCESS_COUNT > 0 # Use N processes (N defaults to 4) Minitest.parallel_executor = ForkingExecutor.new(PROCESS_COUNT) end -- cgit v1.2.3 From 586fe4471d3a71b7500f734d26b28427332b6e43 Mon Sep 17 00:00:00 2001 From: Robin Dupret Date: Fri, 27 Feb 2015 14:25:43 +0100 Subject: Avoid accurate assertions on error messages Since there are disparities between the raised error messages on the different implementations, let's avoid being too accurate. --- actionpack/test/dispatch/debug_exceptions_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/test') diff --git a/actionpack/test/dispatch/debug_exceptions_test.rb b/actionpack/test/dispatch/debug_exceptions_test.rb index 7921f05688..a867aee7ec 100644 --- a/actionpack/test/dispatch/debug_exceptions_test.rb +++ b/actionpack/test/dispatch/debug_exceptions_test.rb @@ -305,7 +305,7 @@ class DebugExceptionsTest < ActionDispatch::IntegrationTest assert_response 500 assert_select '#Application-Trace' do - assert_select 'pre code', /\(eval\):1: syntax error, unexpected/ + assert_select 'pre code', /syntax error, unexpected/ end end @@ -332,7 +332,7 @@ class DebugExceptionsTest < ActionDispatch::IntegrationTest assert_response 500 assert_select '#Application-Trace' do - assert_select 'pre code', /\(eval\):1: syntax error, unexpected/ + assert_select 'pre code', /syntax error, unexpected/ end end -- cgit v1.2.3 From 562b0b23684333be8766dc73c419f7b753933626 Mon Sep 17 00:00:00 2001 From: Robin Dupret Date: Mon, 2 Mar 2015 17:14:45 +0100 Subject: Skip the failing tests on Rubinius for now --- actionpack/test/controller/live_stream_test.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'actionpack/test') diff --git a/actionpack/test/controller/live_stream_test.rb b/actionpack/test/controller/live_stream_test.rb index 7fd1276e98..0c65270ec1 100644 --- a/actionpack/test/controller/live_stream_test.rb +++ b/actionpack/test/controller/live_stream_test.rb @@ -276,6 +276,8 @@ module ActionController end def test_async_stream + rubinius_skip "https://github.com/rubinius/rubinius/issues/2934" + @controller.latch = ActiveSupport::Concurrency::Latch.new parts = ['hello', 'world'] -- cgit v1.2.3