Skip to content

Commit 0b38403

Browse files
committed
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.
1 parent fa26ef5 commit 0b38403

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/-ext-/thread/test_instrumentation_api.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def test_thread_pass_multi_thread
5454
thread&.join
5555
end
5656

57-
def test_muti_thread_timeline
57+
def test_multi_thread_timeline
5858
threads = nil
5959
full_timeline = record do
6060
threads = threaded_cpu_bound_work(1.0)
@@ -68,7 +68,7 @@ def test_muti_thread_timeline
6868
threads.each do |thread|
6969
timeline = timeline_for(thread, full_timeline)
7070
assert_consistent_timeline(timeline)
71-
assert timeline.count(:suspended) > 1, "Expected threads to yield suspended at least once: #{timeline.inspect}"
71+
assert_operator timeline.count(:suspended), :>=, 1, "Expected threads to yield suspended at least once: #{timeline.inspect}"
7272
end
7373

7474
timeline = timeline_for(Thread.current, full_timeline)

0 commit comments

Comments
 (0)