mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 20:19:19 +00:00
Fix incorrect assertion in TestThreadInstrumentation
The test meant to assert the thread is suspended at least once, but was actually asserting to it to be suspected at least twice.
This commit is contained in:
parent
fa26ef5bf7
commit
0b38403328
@ -54,7 +54,7 @@ class TestThreadInstrumentation < Test::Unit::TestCase
|
||||
thread&.join
|
||||
end
|
||||
|
||||
def test_muti_thread_timeline
|
||||
def test_multi_thread_timeline
|
||||
threads = nil
|
||||
full_timeline = record do
|
||||
threads = threaded_cpu_bound_work(1.0)
|
||||
@ -68,7 +68,7 @@ class TestThreadInstrumentation < Test::Unit::TestCase
|
||||
threads.each do |thread|
|
||||
timeline = timeline_for(thread, full_timeline)
|
||||
assert_consistent_timeline(timeline)
|
||||
assert timeline.count(:suspended) > 1, "Expected threads to yield suspended at least once: #{timeline.inspect}"
|
||||
assert_operator timeline.count(:suspended), :>=, 1, "Expected threads to yield suspended at least once: #{timeline.inspect}"
|
||||
end
|
||||
|
||||
timeline = timeline_for(Thread.current, full_timeline)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user