summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-28 07:31:49 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-28 07:31:49 +0000
commit4542d61628acb2de05a319fe4f5da9b3450260e3 (patch)
treed8d4d8c579d285f30c4f3cb03f727462dcc748fb
parent5a53cbe314203ce63630030110c51e7650d0fc0a (diff)
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
-rw-r--r--test/ruby/test_time.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_time.rb b/test/ruby/test_time.rb
index faeff8ded3..d89a093303 100644
--- a/test/ruby/test_time.rb
+++ b/test/ruby/test_time.rb
@@ -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