Package org.qi4j.api.metrics

Examples of org.qi4j.api.metrics.MetricsHealthCheck


    public void givenMetricsProviderWithoutSupportForHealthCheckWhenRequestingHealthCheckExpectDefaultNullImplementation()
        throws Exception
    {
        MetricsProvider underTest = new MetricsProviderAdapter();
        MetricsHealthCheckFactory factory = underTest.createFactory( MetricsHealthCheckFactory.class );
        MetricsHealthCheck test = factory.registerHealthCheck( getClass(), "test", new MetricsHealthCheck()
        {
            @Override
            public Result check()
                throws Exception
            {
                throw new RuntimeException( "Not healthy!!!" );
            }
        } );
        test.check(); // Should not throw an exception, as it should have been replaced by a null implementation.
    }
View Full Code Here

TOP

Related Classes of org.qi4j.api.metrics.MetricsHealthCheck

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.