Package com.yammer.tenacity.tests

Examples of com.yammer.tenacity.tests.TenacityFailingCommand


    @SuppressWarnings("ThrowableResultOfMethodCallIgnored")
    @Test
    public void loggerLogsOnExpectedException() throws Exception {
        HystrixPlugins.getInstance().registerCommandExecutionHook(new ExceptionLoggingCommandHook(exceptionLogger));
        final HystrixCommand<String> failingCommand = new TenacityFailingCommand();

        failingCommand.execute();

        final List<RuntimeException> loggedExceptions = exceptionLogger.getLoggedExceptions();
        assertEquals(1, loggedExceptions.size());
        assertTrue(loggedExceptions.get(0).getClass().equals(RuntimeException.class));
    }
View Full Code Here

TOP

Related Classes of com.yammer.tenacity.tests.TenacityFailingCommand

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.