summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Boussier <jean.boussier@gmail.com>2024-05-20 11:42:34 +0900
committerJean Boussier <jean.boussier@gmail.com>2024-05-20 14:59:59 +0900
commit0b38403328f02f2b103e15103b2ace69d123c9f3 (patch)
tree70cd52daa2022b9577e4ca9a5e79a4626328e5ae
parentfa26ef5bf715c7eb0bd80dd587a3f86f808f56af (diff)
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.
-rw-r--r--test/-ext-/thread/test_instrumentation_api.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/-ext-/thread/test_instrumentation_api.rb b/test/-ext-/thread/test_instrumentation_api.rb
index 9a3b67fa10..663e41be53 100644
--- a/test/-ext-/thread/test_instrumentation_api.rb
+++ b/test/-ext-/thread/test_instrumentation_api.rb
@@ -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)