8889909192939495969798
}); } }); threadGroupRunner.start(); threadGroupRunner.join(); } @Test public void testConcurrentLocking() throws InterruptedException { reset(portalInfoProvider);
138139140141142143144145146147148
}); } }); threadGroupRunner.start(); threadGroupRunner.join(); assertEquals(1, lockCounter.intValue()); ClusterMutex mutex = clusterLockDao.getClusterMutex(mutexName); assertTrue(mutex.isLocked());
194195196197198199200201202203204
130131132133134135136137138139140
}); } }); threadGroupRunner.start(); threadGroupRunner.join(); assertEquals(1, executionCounter.get()); assertEquals(1, trueCounter.get()); assertEquals(threads - 1, falseCounter.get()); assertFalse(concurrent.get());