Skip to content

Commit

Permalink
Turn on allow_exceptions to determine what is happening with the merg…
Browse files Browse the repository at this point in the history
…e_test.rb on Ruby 3.0
  • Loading branch information
cfis committed Apr 17, 2023
1 parent ee9417f commit d0fbabe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/merge_test.rb
Expand Up @@ -47,7 +47,7 @@ def concurrency_multiple_workers
end

def test_single_worker_unmerged
result = RubyProf::Profile.profile(measure_mode: RubyProf::WALL_TIME) { concurrency_single_worker }
result = RubyProf::Profile.profile(measure_mode: RubyProf::WALL_TIME, :allow_exceptions => true) { concurrency_single_worker }
assert_equal(4, result.threads.size)

thread = result.threads[0]
Expand Down Expand Up @@ -76,7 +76,7 @@ def test_single_worker_unmerged
end

def test_single_worker_merged
result = RubyProf::Profile.profile(measure_mode: RubyProf::WALL_TIME) { concurrency_single_worker }
result = RubyProf::Profile.profile(measure_mode: RubyProf::WALL_TIME, :allow_exceptions => true) { concurrency_single_worker }
result.merge!

assert_equal(2, result.threads.size)
Expand All @@ -95,7 +95,7 @@ def test_single_worker_merged
end

def test_multiple_workers_unmerged
result = RubyProf::Profile.profile(measure_mode: RubyProf::WALL_TIME) { concurrency_multiple_workers }
result = RubyProf::Profile.profile(measure_mode: RubyProf::WALL_TIME, :allow_exceptions => true) { concurrency_multiple_workers }
assert_equal(4, result.threads.count)

thread = result.threads[0]
Expand Down Expand Up @@ -124,7 +124,7 @@ def test_multiple_workers_unmerged
end

def test_multiple_workers_merged
result = RubyProf::Profile.profile(measure_mode: RubyProf::WALL_TIME) { concurrency_multiple_workers }
result = RubyProf::Profile.profile(measure_mode: RubyProf::WALL_TIME, :allow_exceptions => true) { concurrency_multiple_workers }
result.merge!

assert_equal(2, result.threads.count)
Expand Down

0 comments on commit d0fbabe

Please sign in to comment.