File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -9,9 +9,9 @@ def setup
99 @it = SecureRandom
1010 end
1111
12- # This test took 2 minutes on my machine.
13- # And 65536 times loop could not be enough for forcing PID recycle.
14- if false
12+ # This test took 2 minutes on my machine.
13+ # And 65536 times loop could not be enough for forcing PID recycle.
14+ # We should run this test only on GitHub Actions.
1515 def test_s_random_bytes_is_fork_safe
1616 begin
1717 require 'openssl'
@@ -21,7 +21,7 @@ def test_s_random_bytes_is_fork_safe
2121 SecureRandom . random_bytes ( 8 )
2222 pid , v1 = forking_random_bytes
2323 assert ( check_forking_random_bytes ( pid , v1 ) , 'Process ID not recycled?' )
24- end
24+ end if ENV [ "CI" ]
2525
2626 def forking_random_bytes
2727 r , w = IO . pipe
@@ -60,7 +60,6 @@ def check_forking_random_bytes(target_pid, target)
6060 end
6161 false # not recycled?
6262 end
63- end
6463
6564 def test_with_openssl
6665 begin
You can’t perform that action at this time.
0 commit comments