Package org.apache.qpid.server.configuration

Examples of org.apache.qpid.server.configuration.ServerConfiguration


        // Validation

        assertTrue("MST messages not logged", results.size() > 0);

        // Load VirtualHost list from file.
        ServerConfiguration configuration = new ServerConfiguration(_configFile);
        List<String> vhosts = configuration.getConfig().getList("virtualhosts.virtualhost.name");

        //Validate each vhost logs a creation
        results = _monitor.findMatches("MST-1004 : Recovery Start :");

        // We are only looking for the default queue defined in local host being
        // recovered. If other tests have made queues in test then we want to
        // exclude them here.
        results = filterResultsByVirtualHost(results, "/localhost");

        assertEquals("Recovered test queue not found.", 1, results.size());

        String result = getLog(results.get(0));

        // getSlize will return extract the vhost from vh(/test) -> '/test'
        // so remove the '/' to get the name
        String vhostName = AbstractTestLogSubject.getSlice("vh", result).substring(1);

        // To get the store class used in the configuration we need to know
        // the virtualhost name, found above. AND
        // the index that the virtualhost is within the configuration.
        // we can retrive that from the vhosts list previously extracted.
        String fullStoreName = configuration.getConfig().getString("virtualhosts.virtualhost(" + vhosts.indexOf(vhostName) + ")." + vhostName + ".store.class");

        // Get the Simple class name from the expected class name of o.a.q.s.s.MMS
        String storeName = fullStoreName.substring(fullStoreName.lastIndexOf(".") + 1);

        assertTrue("MST-1006 does end with queue 'test-queue':" + getMessageString(result),
View Full Code Here


        // Validation

        assertTrue("MST messages not logged", results.size() > 0);

        // Load VirtualHost list from file.
        ServerConfiguration configuration = new ServerConfiguration(_configFile);
        List<String> vhosts = configuration.getConfig().getList("virtualhosts.virtualhost.name");

        //Validate each vhost logs a creation
        results = _monitor.findMatches("MST-1006 : Recovery Complete :");

        // We are only looking for the default queue defined in local host being
        // recovered. If other tests have made queues in test then we want to
        // exclude them here.
        results = filterResultsByVirtualHost(results, "/localhost");

        assertEquals("Recovered test queue not found.", 1, results.size());

        String result = getLog(results.get(0));

        // getSlize will return extract the vhost from vh(/test) -> '/test'
        // so remove the '/' to get the name
        String vhostName = AbstractTestLogSubject.getSlice("vh", result).substring(1);

        // To get the store class used in the configuration we need to know
        // the virtualhost name, found above. AND
        // the index that the virtualhost is within the configuration.
        // we can retrive that from the vhosts list previously extracted.
        String fullStoreName = configuration.getConfig().getString("virtualhosts.virtualhost(" + vhosts.indexOf(vhostName) + ")." + vhostName + ".store.class");

        // Get the Simple class name from the expected class name of o.a.q.s.s.MMS
        String storeName = fullStoreName.substring(fullStoreName.lastIndexOf(".") + 1);

        assertTrue("MST-1006 does end with queue 'test-queue':" + getMessageString(result),
View Full Code Here

            // Validation

            assertTrue("MST messages not logged", results.size() > 0);

            // Load VirtualHost list from file.
            ServerConfiguration configuration = new ServerConfiguration(_configFile);
            List<String> vhosts = configuration.getConfig().getList("virtualhosts.virtualhost.name");

            //Validate each vhost logs a creation
            results = _monitor.findMatches("MST-1004 : Recovery Start : " + queueName);

            assertEquals("Recovered test queue not found.", 1, results.size());

            String result = getLog(results.get(0));

            validateMessageID("MST-1004", result);

            assertTrue("MST-1004 does end with queue '" + queueName + "':" + getMessageString(result),
                       getMessageString(result).endsWith(queueName));

            results = _monitor.findMatches("MST-1005");

            assertTrue("Insufficient MST-1005 logged.", results.size()>0);

            result = null;

            // If the first message is not our queue the second one will be
            for(String resultEntry : results)
            {
                // Look for first match and set that to result
                if (resultEntry.contains(queueName))
                {
                    result = getLog(resultEntry);
                    break;
                }
            }

            assertNotNull("MST-1005 entry for queue:" + queueName + ". Not found", result);

            // getSlize will return extract the vhost from vh(/test) -> '/test'
            // so remove the '/' to get the name
            String vhostName = AbstractTestLogSubject.getSlice("vh", result).substring(1);

            // To get the store class used in the configuration we need to know
            // the virtualhost name, found above. AND
            // the index that the virtualhost is within the configuration.
            // we can retrive that from the vhosts list previously extracted.
            String fullStoreName = configuration.getConfig().getString("virtualhosts.virtualhost(" + vhosts.indexOf(vhostName) + ")." + vhostName + ".store.class");

            // Get the Simple class name from the expected class name of o.a.q.s.s.MMS
            String storeName = fullStoreName.substring(fullStoreName.lastIndexOf(".") + 1);

            assertTrue("MST-1005 does end with queue 'test-queue':" + getMessageString(result),
View Full Code Here

        List<String> results = _monitor.findMatches(VHT_PREFIX);
        try
        {
            // Validation
            ServerConfiguration configuration = new ServerConfiguration(_configFile);
            List<String> vhosts = configuration.getConfig().getList("virtualhosts.virtualhost.name");

            //Validate each vhost logs a creation
            results = _monitor.findMatches("VHT-1001");

            assertEquals("Each vhost did not create a store.", vhosts.size(), results.size());
View Full Code Here

        List<String> results = _monitor.findMatches(VHT_PREFIX);
        try
        {
            // Validation

            ServerConfiguration configuration = new ServerConfiguration(_configFile);
            List<String> vhosts = configuration.getConfig().getList("virtualhosts.virtualhost.name");

            //Validate each vhost logs a creation
            results = _monitor.findMatches("VHT-1002");

            assertEquals("Each vhost did not create a store.", vhosts.size(), results.size());
View Full Code Here

    UnitTestMessageLogger _rawLogger;

    public void setUp() throws ConfigurationException
    {
        Configuration config = new PropertiesConfiguration();
        ServerConfiguration serverConfig = new ServerConfiguration(config);

        _rawLogger = new UnitTestMessageLogger();

        _rootLogger = new RootMessageLoggerImpl(serverConfig, _rawLogger);
    }
View Full Code Here

    public void testChannelLoggingOFF() throws ConfigurationException, AMQException
    {
        Configuration config = new PropertiesConfiguration();
        config.addProperty("status-updates", "OFF");

        ServerConfiguration serverConfig = new ServerConfiguration(config);

        _rawLogger = new UnitTestMessageLogger();

        setUpWithConfig(serverConfig);
View Full Code Here

    public void testChannelLoggingOfF() throws ConfigurationException, AMQException
    {
        Configuration config = new PropertiesConfiguration();
        config.addProperty("status-updates", "OfF");

        ServerConfiguration serverConfig = new ServerConfiguration(config);

        _rawLogger = new UnitTestMessageLogger();

        setUpWithConfig(serverConfig);
View Full Code Here

    public void testChannelLoggingOff() throws ConfigurationException, AMQException
    {
        Configuration config = new PropertiesConfiguration();
        config.addProperty("status-updates", "Off");

        ServerConfiguration serverConfig = new ServerConfiguration(config);

        _rawLogger = new UnitTestMessageLogger();

        setUpWithConfig(serverConfig);
View Full Code Here

    public void testChannelLoggingofF() throws ConfigurationException, AMQException
    {
        Configuration config = new PropertiesConfiguration();
        config.addProperty("status-updates", "ofF");

        ServerConfiguration serverConfig = new ServerConfiguration(config);

        _rawLogger = new UnitTestMessageLogger();

        setUpWithConfig(serverConfig);
View Full Code Here

TOP

Related Classes of org.apache.qpid.server.configuration.ServerConfiguration

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.