diff options
author | Yusuke Endoh <[email protected]> | 2025-04-24 17:59:16 +0900 |
---|---|---|
committer | Yusuke Endoh <[email protected]> | 2025-04-24 19:06:49 +0900 |
commit | 5113869f5d0c6f6a0349a23f479240210fefe5d0 (patch) | |
tree | e0dd33a67b3b45212a3623a7ed407670a045aa93 /test | |
parent | 842547604c5fea78bab4a5edf102e2a7081d6740 (diff) |
Fix a flaky test by making sure that a test thread stops
```
1) Failure:
TestThread#test_join_argument_conversion [D:/a/ruby/ruby/src/test/ruby/test_thread.rb:249]:
Expected nil (oid=4) to be the same as #<TestThread::Thread:0x000001e9e13bbc18 D:/a/ruby/ruby/src/test/ruby/test_thread.rb:245 run> (oid=3856).
```
https://github.com/ruby/ruby/actions/runs/14636019219/job/41067199813?pr=13169
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/13170
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_thread.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb index 7784e0bdae..12ba1165ed 100644 --- a/test/ruby/test_thread.rb +++ b/test/ruby/test_thread.rb @@ -243,6 +243,10 @@ class TestThread < Test::Unit::TestCase def test_join_argument_conversion t = Thread.new {} + + # Make sure that the thread terminates + Thread.pass while t.status + assert_raise(TypeError) {t.join(:foo)} limit = Struct.new(:to_f, :count).new(0.05) |