Examples of TestingTicker


Examples of io.airlift.testing.TestingTicker

    @Test
    public void testExceptionFromResponseHandler()
            throws Exception
    {
        final TestingTicker ticker = new TestingTicker();
        final AtomicReference<Duration> tickerIncrement = new AtomicReference<>(new Duration(0, TimeUnit.SECONDS));

        Function<Request, Response> processor = new Function<Request, Response>()
        {
            @Override
            public Response apply(Request input)
            {
                Duration delta = tickerIncrement.get();
                ticker.increment(delta.toMillis(), TimeUnit.MILLISECONDS);
                throw new RuntimeException("Foo");
            }
        };

        CyclicBarrier requestComplete = new CyclicBarrier(2);
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.