mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
skip a test if another Thread is running.
* test/ruby/test_time.rb (test_strftime_no_hidden_garbage): this test checks no object allocation while specific process, however another thread can generate objects. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5a53cbe314
commit
4542d61628
1 changed files with 2 additions and 0 deletions
|
@ -1104,6 +1104,8 @@ class TestTime < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_strftime_no_hidden_garbage
|
||||
skip unless Thread.list.size == 1
|
||||
|
||||
fmt = %w(Y m d).map { |x| "%#{x}" }.join('-') # defeats optimization
|
||||
t = Time.at(0).getutc
|
||||
ObjectSpace.count_objects(res = {}) # creates strings on first call
|
||||
|
|
Loading…
Add table
Reference in a new issue