1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test/-ext-/gvl/test_last_thread.rb
k0kubun e38a0b4606 revisit more MJIT test skips
r65308 passed both trunk-mjit and trunk-mjit-wait CIs. MJIT copy job
looks working fine. Then this commit skips 5 more tests. Some of them
were skipped in a very early stage and may still need to be skipped, but
I want to confirm them since they haven't been changed for a long time.

And this prefers having inline information on `RubyVM::MJIT.enabled?`.
This commit makes it easier to confirm whether there's suspicious test
skip by RubyVM::MJIT.enabled? or not.

After this commit, tentatively we're not skipping tests for MJIT other
than `assert_no_memory_leak` ones.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-22 15:49:22 +00:00

22 lines
405 B
Ruby

# frozen_string_literal: false
class TestLastThread < Test::Unit::TestCase
# [Bug #11237]
def test_last_thread
assert_separately([], <<-"end;") #do
require '-test-/gvl/call_without_gvl'
Thread.new {
sleep 0.2
}
t0 = Time.now
Thread.current.__runnable_sleep__ 1
t1 = Time.now
t = t1 - t0
assert_in_delta(1.0, t, 0.16)
end;
end
end