@Test
  public void testBug32356() throws Exception {
    LogWriterUtils.getLogWriter().fine("[testBug32356]");
    Host host = Host.getHost(0);
    final String name = getUniqueName();
    final Object key = "32356";

    // lock/unlock '32356' in all vms... (make all vms aware of token)
    LogWriterUtils.getLogWriter().fine("[testBug32356] lock/unlock '32356' in all vms");
    for (int i = 0; i < 4; i++) {
      final int vm = i;
      host.getVM(vm).invoke(new CacheSerializableRunnable("testBug32356_step1") {
        @Override
        public void run2() throws CacheException {
          region_testBug32356 = getOrCreateRootRegion().createSubregion(name, getGlobalAttrs());
          Lock lock = region_testBug32356.getDistributedLock(key);
          lock.lock();
          lock.unlock();
        }
      });
    }

    // attempt try-lock of zero wait time in all vms
    LogWriterUtils.getLogWriter()
        .fine("[testBug32356] attempt try-lock of zero wait time in all vms");
    for (int i = 0; i < 4; i++) {
      final int vm = i;
      host.getVM(vm).invoke(new CacheSerializableRunnable("testBug32356_step2") {
        @Override
        public void run2() throws CacheException {
          Lock lock = region_testBug32356.getDistributedLock(key);
          // bug 32356 should cause this to fail...
          assertTrue("Found bug 32356", lock.tryLock());
          lock.unlock();
        }
      });
    }
  }
Tests for 32356 R2 tryLock w/ 0 timeout broken in Distributed Lock Service
geode-core/src/distributedTest/java/org/apache/geode/cache30/GlobalLockingDUnitTest.java