Search in sources :

Example 1 with TestInstance

use of org.apache.qpid.disttest.controller.config.TestInstance in project qpid-broker-j by apache.

the class Controller method runAllTests.

public ResultsForAllTests runAllTests() {
    LOGGER.info("Running all tests");
    ResultsForAllTests resultsForAllTests = new ResultsForAllTests();
    for (TestInstance testInstance : _config.getTests()) {
        ParticipatingClients participatingClients = new ParticipatingClients(_clientRegistry, testInstance.getClientNames());
        ITestRunner runner = _testRunnerFactory.createTestRunner(participatingClients, testInstance, _jmsDelegate, _commandResponseTimeout, AbstractTestRunner.WAIT_FOREVER, _options);
        LOGGER.info("Running test {}. Participating clients: {}", testInstance, participatingClients.getRegisteredNames());
        ITestResult result = runner.run();
        if (result != null) {
            LOGGER.info("Finished test {}, result {}", testInstance, result);
            resultsForAllTests.add(result);
        } else {
            LOGGER.warn("Finished test {} without producing a result.", testInstance);
        }
    }
    return resultsForAllTests;
}
Also used : TestInstance(org.apache.qpid.disttest.controller.config.TestInstance) ITestResult(org.apache.qpid.disttest.results.aggregation.ITestResult)

Example 2 with TestInstance

use of org.apache.qpid.disttest.controller.config.TestInstance in project qpid-broker-j by apache.

the class OrdinaryTestRunnerTest method createTestInstanceWithConnection.

private TestInstance createTestInstanceWithConnection() {
    TestInstance testInstance = mock(TestInstance.class);
    List<CommandForClient> commands = Arrays.asList(new CommandForClient(CLIENT1_CONFIGURED_NAME, new CreateConnectionCommand("conn1", "factory")));
    when(testInstance.createCommands()).thenReturn(commands);
    return testInstance;
}
Also used : TestInstance(org.apache.qpid.disttest.controller.config.TestInstance) CreateConnectionCommand(org.apache.qpid.disttest.message.CreateConnectionCommand)

Aggregations

TestInstance (org.apache.qpid.disttest.controller.config.TestInstance)2 CreateConnectionCommand (org.apache.qpid.disttest.message.CreateConnectionCommand)1 ITestResult (org.apache.qpid.disttest.results.aggregation.ITestResult)1