diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-05-06 17:19:41 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-05-06 19:02:10 +0900 |
commit | f2d6fa16e116cbb624ccc8df4cbc57422e236d46 (patch) | |
tree | 6a72a70091e36462087d378a2645cb98a82ddbb6 | |
parent | 120b835fae2832ded4a02d3fcfc70749cad9d177 (diff) |
Use assert_ractor for separating test processes
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4464
-rw-r--r-- | test/test_prime.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/test/test_prime.rb b/test/test_prime.rb index 8e8203e1c4..a0e8af59be 100644 --- a/test/test_prime.rb +++ b/test/test_prime.rb @@ -262,13 +262,12 @@ class TestPrime < Test::Unit::TestCase assert_equal 861, (100_000..110_000).count(&:prime?) end -=begin - # now Ractor should not use in test-all process def test_prime_in_ractor - # Test usage of private constant... - assert_equal false, Ractor.new { ((2**13-1) * (2**17-1)).prime? }.take + assert_ractor(<<~RUBY, require: 'prime') + # Test usage of private constant... + assert_equal false, Ractor.new { ((2**13-1) * (2**17-1)).prime? }.take + RUBY end if defined?(Ractor) -=end end def test_eratosthenes_works_fine_after_timeout |