Search in sources :

Example 36 with ICountDownLatch

use of com.hazelcast.core.ICountDownLatch in project hazelcast by hazelcast.

the class MBeanDestroyTest method testCountDownLatch.

@Test
public void testCountDownLatch() throws Exception {
    ICountDownLatch countDownLatch = holder.getHz().getCountDownLatch("semaphore");
    countDownLatch.getCount();
    holder.assertMBeanExistEventually("ICountDownLatch", countDownLatch.getName());
    destroyObjectAndAssert(countDownLatch, "ICountDownLatch");
}
Also used : ICountDownLatch(com.hazelcast.core.ICountDownLatch) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Example 37 with ICountDownLatch

use of com.hazelcast.core.ICountDownLatch in project hazelcast by hazelcast.

the class MBeanTest method testCountDownLatch.

@Test
public void testCountDownLatch() throws Exception {
    ICountDownLatch countDownLatch = holder.getHz().getCountDownLatch("semaphore");
    countDownLatch.getCount();
    holder.assertMBeanExistEventually("ICountDownLatch", countDownLatch.getName());
}
Also used : ICountDownLatch(com.hazelcast.core.ICountDownLatch) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Aggregations

ICountDownLatch (com.hazelcast.core.ICountDownLatch)37 ParallelTest (com.hazelcast.test.annotation.ParallelTest)37 Test (org.junit.Test)37 HazelcastInstance (com.hazelcast.core.HazelcastInstance)35 QuickTest (com.hazelcast.test.annotation.QuickTest)27 SlowTest (com.hazelcast.test.annotation.SlowTest)10 TestHazelcastInstanceFactory (com.hazelcast.test.TestHazelcastInstanceFactory)5 TestThread (com.hazelcast.test.TestThread)3 IAtomicLong (com.hazelcast.core.IAtomicLong)2 RootCauseMatcher (com.hazelcast.util.RootCauseMatcher)2 CountDownLatchService (com.hazelcast.concurrent.countdownlatch.CountDownLatchService)1 Config (com.hazelcast.config.Config)1 HazelcastInstanceNotActiveException (com.hazelcast.core.HazelcastInstanceNotActiveException)1 Member (com.hazelcast.core.Member)1 DistributedObjectDestroyedException (com.hazelcast.spi.exception.DistributedObjectDestroyedException)1 NodeEngineImpl (com.hazelcast.spi.impl.NodeEngineImpl)1