Package org.apache.qpid.test.framework

Examples of org.apache.qpid.test.framework.FrameworkBaseCase


        Collection<Test> tests = testSuite.getAllUnderlyingTests();

        for (Test test : getAllUnderlyingTests())
        {
            FrameworkBaseCase coordTest = (FrameworkBaseCase) test;

            // Broadcast the invitation to find out what clients are available to test.
            Set<TestClientDetails> enlists = signupClients(coordTest);

            // Compare the list of willing clients to the list of all available.
            Set<TestClientDetails> optOuts = new HashSet<TestClientDetails>(allClients);
            optOuts.removeAll(enlists);

            // Output test failures for clients that will not particpate in the test.
            Set<List<TestClientDetails>> failPairs = allPairs(optOuts, allClients);

            for (List<TestClientDetails> failPair : failPairs)
            {
                // Create a distributed test circuit factory for the test.
                CircuitFactory circuitFactory = getTestSequencer();

                // Create an automatic failure test for the opted out test pair.
                FrameworkBaseCase failTest = new OptOutTestCase("testOptOut");
                circuitFactory.setSender(failPair.get(0));
                circuitFactory.setReceiver(failPair.get(1));
                failTest.setCircuitFactory(circuitFactory);

                failTest.run(testResult);
            }

            // Loop over all combinations of clients, willing to run the test.
            Set<List<TestClientDetails>> enlistedPairs = allPairs(enlists, enlists);
View Full Code Here


        connection = controlConnection;

        // Sign available clients up to the test.
        for (Test test : getAllUnderlyingTests())
        {
            FrameworkBaseCase coordTest = (FrameworkBaseCase) test;

            // Get all of the clients able to participate in the test.
            Set<TestClientDetails> enlists = signupClients(coordTest);

            // Check that there were some clients available.
            if (enlists.size() == 0)
            {
                throw new RuntimeException("No clients to test with");
            }

            // Create a distributed test circuit factory for the test.
            CircuitFactory circuitFactory = getTestSequencer();

            // Set up the first client in the sender role, and the remainder in the receivers role.
            Iterator<TestClientDetails> clients = enlists.iterator();
            circuitFactory.setSender(clients.next());

            while (clients.hasNext())
            {
                // Set the sending and receiving client details on the test case.
                circuitFactory.setReceiver(clients.next());
            }

            // Pass down the connection to hold the coordinating conversation over.
            circuitFactory.setConversationFactory(conversationFactory);

            // If the current test case is a drop-in test, set it up as the currently running test for late joiners to
            // add in to. Otherwise the current test field is set to null, to indicate that late joiners are not allowed.
            currentTest = (coordTest instanceof DropInTest) ? coordTest : null;

            // Execute the test case.
            coordTest.setCircuitFactory(circuitFactory);
        }
    }
View Full Code Here

        }*/

        // Run all of the test cases in the test suite.
        for (Test test : getAllUnderlyingTests())
        {
            FrameworkBaseCase coordTest = (FrameworkBaseCase) test;

            coordTest.run(testResult);

            currentTest = null;
        }
    }
View Full Code Here

    {
        for (Test test : getAllUnderlyingTests())
        {
            if (test instanceof FrameworkBaseCase)
            {
                FrameworkBaseCase frameworkTest = (FrameworkBaseCase) test;
                frameworkTest.setCircuitFactory(new LocalAMQPCircuitFactory());
            }
        }

        // Run the test.
        test.run(testResult);
View Full Code Here

        Collection<Test> tests = testSuite.getAllUnderlyingTests();

        for (Test test : getAllUnderlyingTests())
        {
            FrameworkBaseCase coordTest = (FrameworkBaseCase) test;

            // Broadcast the invitation to find out what clients are available to test.
            Set<TestClientDetails> enlists = signupClients(coordTest);

            // Compare the list of willing clients to the list of all available.
            Set<TestClientDetails> optOuts = new HashSet<TestClientDetails>(allClients);
            optOuts.removeAll(enlists);

            // Output test failures for clients that will not particpate in the test.
            Set<List<TestClientDetails>> failPairs = allPairs(optOuts, allClients);

            for (List<TestClientDetails> failPair : failPairs)
            {
                // Create a distributed test circuit factory for the test.
                CircuitFactory circuitFactory = getTestSequencer();

                // Create an automatic failure test for the opted out test pair.
                FrameworkBaseCase failTest = new OptOutTestCase("testOptOut");
                circuitFactory.setSender(failPair.get(0));
                circuitFactory.setReceiver(failPair.get(1));
                failTest.setCircuitFactory(circuitFactory);

                failTest.run(testResult);
            }

            // Loop over all combinations of clients, willing to run the test.
            Set<List<TestClientDetails>> enlistedPairs = allPairs(enlists, enlists);
View Full Code Here

        connection = controlConnection;

        // Sign available clients up to the test.
        for (Test test : getAllUnderlyingTests())
        {
            FrameworkBaseCase coordTest = (FrameworkBaseCase) test;

            // Get all of the clients able to participate in the test.
            Set<TestClientDetails> enlists = signupClients(coordTest);

            // Check that there were some clients available.
            if (enlists.size() == 0)
            {
                throw new RuntimeException("No clients to test with");
            }

            // Create a distributed test circuit factory for the test.
            CircuitFactory circuitFactory = getTestSequencer();

            // Set up the first client in the sender role, and the remainder in the receivers role.
            Iterator<TestClientDetails> clients = enlists.iterator();
            circuitFactory.setSender(clients.next());

            while (clients.hasNext())
            {
                // Set the sending and receiving client details on the test case.
                circuitFactory.setReceiver(clients.next());
            }

            // Pass down the connection to hold the coordinating conversation over.
            circuitFactory.setConversationFactory(conversationFactory);

            // If the current test case is a drop-in test, set it up as the currently running test for late joiners to
            // add in to. Otherwise the current test field is set to null, to indicate that late joiners are not allowed.
            currentTest = (coordTest instanceof DropInTest) ? coordTest : null;

            // Execute the test case.
            coordTest.setCircuitFactory(circuitFactory);
        }
    }
View Full Code Here

        }*/

        // Run all of the test cases in the test suite.
        for (Test test : getAllUnderlyingTests())
        {
            FrameworkBaseCase coordTest = (FrameworkBaseCase) test;

            coordTest.run(testResult);

            currentTest = null;
        }
    }
View Full Code Here

        Collection<Test> tests = testSuite.getAllUnderlyingTests();

        for (Test test : getAllUnderlyingTests())
        {
            FrameworkBaseCase coordTest = (FrameworkBaseCase) test;

            // Broadcast the invitation to find out what clients are available to test.
            Set<TestClientDetails> enlists = signupClients(coordTest);

            // Compare the list of willing clients to the list of all available.
            Set<TestClientDetails> optOuts = new HashSet<TestClientDetails>(allClients);
            optOuts.removeAll(enlists);

            // Output test failures for clients that will not particpate in the test.
            Set<List<TestClientDetails>> failPairs = allPairs(optOuts, allClients);

            for (List<TestClientDetails> failPair : failPairs)
            {
                // Create a distributed test circuit factory for the test.
                CircuitFactory circuitFactory = getTestSequencer();

                // Create an automatic failure test for the opted out test pair.
                FrameworkBaseCase failTest = new OptOutTestCase("testOptOut");
                circuitFactory.setSender(failPair.get(0));
                circuitFactory.setReceiver(failPair.get(1));
                failTest.setCircuitFactory(circuitFactory);

                failTest.run(testResult);
            }

            // Loop over all combinations of clients, willing to run the test.
            Set<List<TestClientDetails>> enlistedPairs = allPairs(enlists, enlists);
View Full Code Here

        connection = controlConnection;

        // Sign available clients up to the test.
        for (Test test : getAllUnderlyingTests())
        {
            FrameworkBaseCase coordTest = (FrameworkBaseCase) test;

            // Get all of the clients able to participate in the test.
            Set<TestClientDetails> enlists = signupClients(coordTest);

            // Check that there were some clients available.
            if (enlists.size() == 0)
            {
                throw new RuntimeException("No clients to test with");
            }

            // Create a distributed test circuit factory for the test.
            CircuitFactory circuitFactory = getTestSequencer();

            // Set up the first client in the sender role, and the remainder in the receivers role.
            Iterator<TestClientDetails> clients = enlists.iterator();
            circuitFactory.setSender(clients.next());

            while (clients.hasNext())
            {
                // Set the sending and receiving client details on the test case.
                circuitFactory.setReceiver(clients.next());
            }

            // Pass down the connection to hold the coordinating conversation over.
            circuitFactory.setConversationFactory(conversationFactory);

            // If the current test case is a drop-in test, set it up as the currently running test for late joiners to
            // add in to. Otherwise the current test field is set to null, to indicate that late joiners are not allowed.
            currentTest = (coordTest instanceof DropInTest) ? coordTest : null;

            // Execute the test case.
            coordTest.setCircuitFactory(circuitFactory);
        }
    }
View Full Code Here

        }*/

        // Run all of the test cases in the test suite.
        for (Test test : getAllUnderlyingTests())
        {
            FrameworkBaseCase coordTest = (FrameworkBaseCase) test;

            coordTest.run(testResult);

            currentTest = null;
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.qpid.test.framework.FrameworkBaseCase

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.