Examples of sleepABit()


Examples of org.apache.curator.test.Timing.sleepABit()

            {
                // expected
            }
            Assert.assertTrue(timing.acquireSemaphore(semaphore));

            timing.sleepABit();

            server.restart();
            Assert.assertTrue(timing.awaitLatch(latch));

            timing.sleepABit();
View Full Code Here

Examples of org.apache.curator.test.Timing.sleepABit()

            timing.sleepABit();

            server.restart();
            Assert.assertTrue(timing.awaitLatch(latch));

            timing.sleepABit();

            Assert.assertNull(client.checkExists().forPath("/test-me"));
        }
        finally
        {
View Full Code Here

Examples of org.apache.curator.test.Timing.sleepABit()

            {
                // expected
            }
            Assert.assertTrue(timing.acquireSemaphore(semaphore));

            timing.sleepABit();

            server.restart();
            Assert.assertTrue(timing.awaitLatch(latch));

            timing.sleepABit();
View Full Code Here

Examples of org.apache.curator.test.Timing.sleepABit()

            timing.sleepABit();

            server.restart();
            Assert.assertTrue(timing.awaitLatch(latch));

            timing.sleepABit();

            Assert.assertNull(client.checkExists().forPath("/test-me"));
        }
        finally
        {
View Full Code Here

Examples of org.apache.curator.test.Timing.sleepABit()

            {
                // expected
            }
            Assert.assertTrue(timing.acquireSemaphore(semaphore));

            timing.sleepABit();

            server.restart();
            Assert.assertTrue(timing.awaitLatch(latch));

            timing.sleepABit();
View Full Code Here

Examples of org.apache.curator.test.Timing.sleepABit()

            timing.sleepABit();

            server.restart();
            Assert.assertTrue(timing.awaitLatch(latch));

            timing.sleepABit();

            Assert.assertNull(namespaceClient.checkExists().forPath("/test-me"));
        }
        finally
        {
View Full Code Here

Examples of org.apache.curator.test.Timing.sleepABit()

            final int       TRIES = 5;
            for ( int i = 0; i < TRIES; ++i )
            {
                if ( client.checkExists().forPath(PATH) != null )
                {
                    timing.sleepABit();
                }
            }
            Assert.assertNull(client.checkExists().forPath(PATH));
        }
        finally
View Full Code Here

Examples of org.apache.curator.test.Timing.sleepABit()

            exec.setExecuteCalled(false);
            cache.close();
            Assert.assertFalse(exec.isExecuteCalled());

            client.delete().forPath("/test/one");
            timing.sleepABit();
            Assert.assertFalse(exec.isExecuteCalled());
        }
        finally {
            client.close();
        }
View Full Code Here

Examples of org.apache.curator.test.Timing.sleepABit()

                }
            };

            // queue a background operation that will block due to the debugListener
            client.create().inBackground().forPath("/hey");
            timing.sleepABit();

            // close the client while the background is still blocked
            client.close();

            // unblock the background
View Full Code Here

Examples of org.apache.curator.test.Timing.sleepABit()

            // close the client while the background is still blocked
            client.close();

            // unblock the background
            operationReadyLatch.countDown();
            timing.sleepABit();

            // should not generate an exception
            Assert.assertFalse(hadIllegalStateException.get());
        }
        finally
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.