Package com.netflix.hystrix.HystrixCollapserTest

Examples of com.netflix.hystrix.HystrixCollapserTest.TestCollapserTimer


        }
    }

    @Test
    public void testTwoRequests() throws Exception {
        TestCollapserTimer timer = new TestCollapserTimer();
        Future<String> response1 = new TestRequestCollapser(timer, counter, 1).observe().toBlocking().toFuture();
        Future<String> response2 = new TestRequestCollapser(timer, counter, 2).observe().toBlocking().toFuture();
        timer.incrementTime(10); // let time pass that equals the default delay/period

        assertEquals("1", response1.get());
        assertEquals("2", response2.get());

        assertEquals(1, counter.get());
View Full Code Here

TOP

Related Classes of com.netflix.hystrix.HystrixCollapserTest.TestCollapserTimer

Copyright © 2018 www.massapicom. 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.