mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Use assert_ractor for separating test processes
This commit is contained in:
parent
120b835fae
commit
f2d6fa16e1
Notes:
git
2021-05-06 19:02:37 +09:00
1 changed files with 4 additions and 5 deletions
|
@ -262,13 +262,12 @@ class TestPrime < Test::Unit::TestCase
|
||||||
assert_equal 861, (100_000..110_000).count(&:prime?)
|
assert_equal 861, (100_000..110_000).count(&:prime?)
|
||||||
end
|
end
|
||||||
|
|
||||||
=begin
|
|
||||||
# now Ractor should not use in test-all process
|
|
||||||
def test_prime_in_ractor
|
def test_prime_in_ractor
|
||||||
|
assert_ractor(<<~RUBY, require: 'prime')
|
||||||
# Test usage of private constant...
|
# Test usage of private constant...
|
||||||
assert_equal false, Ractor.new { ((2**13-1) * (2**17-1)).prime? }.take
|
assert_equal false, Ractor.new { ((2**13-1) * (2**17-1)).prime? }.take
|
||||||
|
RUBY
|
||||||
end if defined?(Ractor)
|
end if defined?(Ractor)
|
||||||
=end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_eratosthenes_works_fine_after_timeout
|
def test_eratosthenes_works_fine_after_timeout
|
||||||
|
|
Loading…
Reference in a new issue