Move constants under the TestCase
This commit is contained in:
parent
54d2d70629
commit
93c44c4ed2
Notes:
git
2021-09-11 08:48:43 +09:00
@ -844,11 +844,6 @@ EOT
|
|||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
# kernel resolution can limit the minimum time we can measure
|
|
||||||
# [ruby-core:81540]
|
|
||||||
MIN_HZ = MiniTest::Unit::TestCase.windows? ? 67 : 100
|
|
||||||
MIN_MEASURABLE = 1.0 / MIN_HZ
|
|
||||||
|
|
||||||
def assert_cpu_usage_low(msg = nil, pct: 0.05, wait: 1.0, stop: nil)
|
def assert_cpu_usage_low(msg = nil, pct: 0.05, wait: 1.0, stop: nil)
|
||||||
require 'benchmark'
|
require 'benchmark'
|
||||||
|
|
||||||
|
@ -154,6 +154,11 @@ module Test
|
|||||||
PASSTHROUGH_EXCEPTIONS = [NoMemoryError, SignalException,
|
PASSTHROUGH_EXCEPTIONS = [NoMemoryError, SignalException,
|
||||||
Interrupt, SystemExit] # :nodoc:
|
Interrupt, SystemExit] # :nodoc:
|
||||||
|
|
||||||
|
# kernel resolution can limit the minimum time we can measure
|
||||||
|
# [ruby-core:81540]
|
||||||
|
MIN_HZ = windows? ? 67 : 100
|
||||||
|
MIN_MEASURABLE = 1.0 / MIN_HZ
|
||||||
|
|
||||||
##
|
##
|
||||||
# Runs the tests reporting the status to +runner+
|
# Runs the tests reporting the status to +runner+
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user