module ShareLockTest::CustomAssertions
Constants
- SUFFICIENT_TIMEOUT
Private Instance Methods
assert_threads_not_stuck(threads)
click to toggle source
# File activesupport/test/share_lock_test.rb, line 510 def assert_threads_not_stuck(threads) assert(Array(threads).all? { |t| t.join(SUFFICIENT_TIMEOUT) }) end
assert_threads_stuck(threads)
click to toggle source
# File activesupport/test/share_lock_test.rb, line 505 def assert_threads_stuck(threads) sleep(SUFFICIENT_TIMEOUT) # give threads time to do their business assert(Array(threads).all? { |t| t.join(0.001).nil? }) end
assert_threads_stuck_but_releasable_by_latch(threads, latch)
click to toggle source
# File activesupport/test/share_lock_test.rb, line 499 def assert_threads_stuck_but_releasable_by_latch(threads, latch) assert_threads_stuck threads latch.count_down assert_threads_not_stuck threads end