diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-02-10 08:15:39 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-02-10 08:15:39 +0000 |
commit | 25a0974d88c5a1d47ee2a12409fd8e73df843e7b (patch) | |
tree | 0300a4c7be4944f68d3f278c229d1cb5f67fb338 /test/ruby/test_thread.rb | |
parent | 499a1e5b3e438a4c9d4a240895cc56c41e1280d5 (diff) | |
download | ruby-25a0974d88c5a1d47ee2a12409fd8e73df843e7b.tar.gz |
check thread deadness correctly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_thread.rb')
-rw-r--r-- | test/ruby/test_thread.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb index 9daff2d866..d7b5dadf81 100644 --- a/test/ruby/test_thread.rb +++ b/test/ruby/test_thread.rb @@ -1160,4 +1160,14 @@ q.pop c = Class.new(Thread) {def initialize() self.name = "foo"; super; end} assert_equal("foo", c.new {Thread.current.name}.value, bug12290) end + + def test_thread_interrupt_for_killed_thread + assert_normal_exit(<<-_end, '[Bug #8996]', timeout: 5, timeout_error: nil) + trap(:TERM){exit} + while true + t = Thread.new{sleep 0} + t.raise Interrupt + end + _end + end end |