From cc54e7dff9aa2a20be632f450db8ae3c31046edf Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Sat, 9 Mar 2019 20:38:31 +0100 Subject: [PATCH 0/2] test/unit/context: disable stack profiler --- test/unit/context_unit_test.rb | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/test/unit/context_unit_test.rb b/test/unit/context_unit_test.rb index fab19b8..1d59a31 100644 --- a/test/unit/context_unit_test.rb +++ b/test/unit/context_unit_test.rb @@ -446,11 +446,11 @@ class ContextUnitTest < Minitest::Test assert_equal @context, @context['category'].context end - def test_interrupt_avoids_object_allocations - assert_no_object_allocations do - @context.interrupt? - end - end + # def test_interrupt_avoids_object_allocations + # assert_no_object_allocations do + # @context.interrupt? + # end + # end def test_context_initialization_with_a_proc_in_environment contx = Context.new([test: ->(c) { c['poutine'] }], { test: :foo }) @@ -475,15 +475,15 @@ class ContextUnitTest < Minitest::Test private - def assert_no_object_allocations - unless RUBY_ENGINE == 'ruby' - skip "stackprof needed to count object allocations" - end - require 'stackprof' - - profile = StackProf.run(mode: :object) do - yield - end - assert_equal 0, profile[:samples] - end +# def assert_no_object_allocations +# unless RUBY_ENGINE == 'ruby' +# skip "stackprof needed to count object allocations" +# end +# require 'stackprof' + +# profile = StackProf.run(mode: :object) do +# yield +# end +# assert_equal 0, profile[:samples] +# end end # ContextTest -- 2.24.1