Methods
S
T
Included Modules
Instance Public methods
setup()
# File activesupport/test/share_lock_test.rb, line 516
def setup
  @latch = Concurrent::CountDownLatch.new
  @thread = Thread.new { @latch.wait }
end
teardown()
# File activesupport/test/share_lock_test.rb, line 521
def teardown
  @latch.count_down
  @thread.join
end
test_detects_already_released()
# File activesupport/test/share_lock_test.rb, line 543
def test_detects_already_released
  @latch.count_down
  assert_raises(Minitest::Assertion) do
    assert_threads_stuck_but_releasable_by_latch @thread, @latch
  end
end
test_detects_free_thread()
# File activesupport/test/share_lock_test.rb, line 536
def test_detects_free_thread
  @latch.count_down
  assert_raises(Minitest::Assertion) do
    assert_threads_stuck @thread
  end
end
test_detects_remains_latched()
# File activesupport/test/share_lock_test.rb, line 550
def test_detects_remains_latched
  another_latch = Concurrent::CountDownLatch.new
  assert_raises(Minitest::Assertion) do
    assert_threads_stuck_but_releasable_by_latch @thread, another_latch
  end
end
test_detects_stuck_thread()
# File activesupport/test/share_lock_test.rb, line 530
def test_detects_stuck_thread
  assert_raises(Minitest::Assertion) do
    assert_threads_not_stuck @thread
  end
end
test_happy_path()
# File activesupport/test/share_lock_test.rb, line 526
def test_happy_path
  assert_threads_stuck_but_releasable_by_latch @thread, @latch
end