diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-25 03:34:27 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-25 03:34:27 +0000 |
commit | 36c9605a6edbb69c2c8ebaf11a75b48a57934863 (patch) | |
tree | 7a7a8229e9fe7a64c9ad945e00f9c57063e7a4a3 /test/lib | |
parent | c3abc41532b2e287dab397cf305a457ff01877fa (diff) | |
download | ruby-36c9605a6edbb69c2c8ebaf11a75b48a57934863.tar.gz |
* test/lib/minitest/unit.rb: Sort leaked threads and tempfiles.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/lib')
-rw-r--r-- | test/lib/minitest/unit.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/lib/minitest/unit.rb b/test/lib/minitest/unit.rb index 6f686ac85e..49d3809cb9 100644 --- a/test/lib/minitest/unit.rb +++ b/test/lib/minitest/unit.rb @@ -964,15 +964,18 @@ module MiniTest live2 = live_thread_and_tempfile thread_finished = live1[0] - live2[0] if !thread_finished.empty? - puts "Finished threads: #{inst.class}\##{inst.__name__}:#{thread_finished.map {|t| ' ' + t.inspect }.join}" + list = thread_finished.map {|t| ' ' + t.inspect }.sort.join + puts "Finished threads: #{inst.class}\##{inst.__name__}:#{list}" end thread_retained = live2[0] - live1[0] if !thread_retained.empty? - puts "Leaked threads: #{inst.class}\##{inst.__name__}:#{thread_retained.map {|t| ' ' + t.inspect }.join}" + list = thread_retained.map {|t| ' ' + t.inspect }.sort.join + puts "Leaked threads: #{inst.class}\##{inst.__name__}:#{list}" end tempfile_retained = live2[1] - live1[1] if !tempfile_retained.empty? - puts "Leaked tempfiles: #{inst.class}\##{inst.__name__}:#{tempfile_retained.map {|t| ' ' + t.inspect }.join}" + list = tempfile_retained.map {|t| ' ' + t.inspect }.sort.join + puts "Leaked tempfiles: #{inst.class}\##{inst.__name__}:#{list}" tempfile_retained.each {|t| t.unlink } end end |