@Test
  public void testWaitForever() throws Exception {
    final CacheTransactionManager mgr = cache.getCacheTransactionManager();
    mgr.begin();
    region.put("key", "value");
    final TransactionId txId = mgr.suspend();
    mgr.resume(txId);
    final CountDownLatch latch = new CountDownLatch(1);
    Thread t = new Thread(() -> {
      long start = System.currentTimeMillis();
      assertTrue(mgr.tryResume(txId, Long.MAX_VALUE, TimeUnit.MILLISECONDS));
      long end = System.currentTimeMillis();
      assert end - start >= 1000;
      latch.countDown();
    });
    t.start();
    Thread.sleep(1100);
    mgr.suspend();
    latch.await();
  }
test that timeout of Long.MAX_VALUE does not return immediately
geode-core/src/integrationTest/java/org/apache/geode/internal/cache/TXManagerImplJUnitTest.java