Package com.netflix.hystrix.util.HystrixTimer

Examples of com.netflix.hystrix.util.HystrixTimer.ScheduledExecutor


    public void testReset() {
        HystrixTimer timer = HystrixTimer.getInstance();
        TestListener l1 = new TestListener(50, "A");
        timer.addTimerListener(l1);

        ScheduledExecutor ex = timer.executor.get();

        assertFalse(ex.executor.isShutdown());

        // perform reset which should shut it down
        HystrixTimer.reset();

        assertTrue(ex.executor.isShutdown());
        assertNull(timer.executor.get());

        // assert it starts up again on use
        TestListener l2 = new TestListener(50, "A");
        timer.addTimerListener(l2);

        ScheduledExecutor ex2 = timer.executor.get();

        assertFalse(ex2.executor.isShutdown());

        // reset again to shutdown what we just started
        HystrixTimer.reset();
View Full Code Here

TOP

Related Classes of com.netflix.hystrix.util.HystrixTimer.ScheduledExecutor

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.