@After
  public final void interruptStuckThreads() throws Exception {
    server1.invoke(() -> {
      if (stuckThread != null) {
        stuckThread.interrupt();
      }
      stuckThread = null;
    });
    server2.invoke(() -> {
      if (stuckThread != null) {
        stuckThread.interrupt();
      }
      stuckThread = null;
    });

    // Wait to allow the locks to be released to avoid environment pollution for tests that follow
    server1.invoke(() -> {
      await().until(() -> !LOCK.isLocked());
    });
    server2.invoke(() -> {
      await().until(() -> !LOCK.isLocked());
    });
  }
Distributed test base for show deadlock command in {@link ShowDeadlockCommand}.
geode-dunit/src/main/java/org/apache/geode/management/internal/cli/commands/ShowDeadlockDistributedTestBase.java