Package org.apache.qpid.server.configuration.plugins

Examples of org.apache.qpid.server.configuration.plugins.SlowConsumerDetectionPolicyConfiguration$SlowConsumerDetectionPolicyConfigurationFactory


     * that a value can be set for the policy.
     *
     */
    public void testConfigLoadingValidConfig()
    {
        SlowConsumerDetectionPolicyConfiguration config = new SlowConsumerDetectionPolicyConfiguration();

        XMLConfiguration xmlconfig = new XMLConfiguration();

        String policyName = "TestPolicy";
        xmlconfig.addProperty("name", policyName);

        // Create a CompositeConfiguration as this is what the broker uses
        CompositeConfiguration composite = new CompositeConfiguration();
        composite.addConfiguration(xmlconfig);

        try
        {
            config.setConfiguration("", composite);
        }
        catch (ConfigurationException e)
        {
            e.printStackTrace();
            fail(e.getMessage());
        }

        assertEquals("Policy name not retrieved as expected.",
                     policyName, config.getPolicyName());
    }
View Full Code Here


     * is checked to confirm the right reason.
     *
     */
    public void testConfigLoadingInValidConfig()
    {
        SlowConsumerDetectionPolicyConfiguration config = new SlowConsumerDetectionPolicyConfiguration();

        XMLConfiguration xmlconfig = new XMLConfiguration();


        // Create a CompositeConfiguration as this is what the broker uses
        CompositeConfiguration composite = new CompositeConfiguration();
        composite.addConfiguration(xmlconfig);

        try
        {
            config.setConfiguration("", composite);
            fail("Config is invalid so won't validate.");           
        }
        catch (ConfigurationException e)
        {
            e.printStackTrace();
View Full Code Here

     * that a value can be set for the policy.
     *
     */
    public void testConfigLoadingValidConfig()
    {
        SlowConsumerDetectionPolicyConfiguration config = new SlowConsumerDetectionPolicyConfiguration();

        XMLConfiguration xmlconfig = new XMLConfiguration();

        String policyName = "TestPolicy";
        xmlconfig.addProperty("name", policyName);

        // Create a CompositeConfiguration as this is what the broker uses
        CompositeConfiguration composite = new CompositeConfiguration();
        composite.addConfiguration(xmlconfig);

        try
        {
            config.setConfiguration("", composite);
        }
        catch (ConfigurationException e)
        {
            e.printStackTrace();
            fail(e.getMessage());
        }

        assertEquals("Policy name not retrieved as expected.",
                     policyName, config.getPolicyName());
    }
View Full Code Here

     * is checked to confirm the right reason.
     *
     */
    public void testConfigLoadingInValidConfig()
    {
        SlowConsumerDetectionPolicyConfiguration config = new SlowConsumerDetectionPolicyConfiguration();

        XMLConfiguration xmlconfig = new XMLConfiguration();


        // Create a CompositeConfiguration as this is what the broker uses
        CompositeConfiguration composite = new CompositeConfiguration();
        composite.addConfiguration(xmlconfig);

        try
        {
            config.setConfiguration("", composite);
            fail("Config is invalid so won't validate.");           
        }
        catch (ConfigurationException e)
        {
            e.printStackTrace();
View Full Code Here

TOP

Related Classes of org.apache.qpid.server.configuration.plugins.SlowConsumerDetectionPolicyConfiguration$SlowConsumerDetectionPolicyConfigurationFactory

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.