Search in sources :

Example 6 with Config

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

the class ControllerRunner method runTest.

private ResultsForAllTests runTest(Controller controller, String testConfigFile) {
    final Config testConfig = buildTestConfigFrom(testConfigFile);
    controller.setConfig(testConfig);
    ResultsForAllTests rawResultsForAllTests = controller.runAllTests();
    ResultsForAllTests resultsForAllTests = _aggregator.aggregateResults(rawResultsForAllTests);
    _resultsWriter.writeResults(resultsForAllTests, testConfigFile);
    return resultsForAllTests;
}
Also used : Config(org.apache.qpid.disttest.controller.config.Config) ResultsForAllTests(org.apache.qpid.disttest.controller.ResultsForAllTests)

Example 7 with Config

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

the class ControllerRunner method buildTestConfigFrom.

private Config buildTestConfigFrom(String testConfigFile) {
    ConfigReader configReader = new ConfigReader();
    Config testConfig;
    try {
        testConfig = configReader.getConfigFromFile(testConfigFile);
    } catch (IOException e) {
        throw new DistributedTestException("Exception while loading test config from '" + testConfigFile + "'", e);
    }
    return testConfig;
}
Also used : Config(org.apache.qpid.disttest.controller.config.Config) ConfigReader(org.apache.qpid.disttest.controller.config.ConfigReader) IOException(java.io.IOException)

Example 8 with Config

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

the class ControllerTest method testControllerRejectsEmptyConfiguration.

@Test
public void testControllerRejectsEmptyConfiguration() {
    Config configWithZeroClients = createMockConfig(0);
    try {
        _controller.setConfig(configWithZeroClients);
        fail("Exception not thrown");
    } catch (DistributedTestException e) {
    // PASS
    }
}
Also used : DistributedTestException(org.apache.qpid.disttest.DistributedTestException) Config(org.apache.qpid.disttest.controller.config.Config) Test(org.junit.Test)

Aggregations

Config (org.apache.qpid.disttest.controller.config.Config)8 IOException (java.io.IOException)2 ArrayList (java.util.ArrayList)2 ResultsForAllTests (org.apache.qpid.disttest.controller.ResultsForAllTests)2 Test (org.junit.Test)2 HashMap (java.util.HashMap)1 DistributedTestException (org.apache.qpid.disttest.DistributedTestException)1 ConfigReader (org.apache.qpid.disttest.controller.config.ConfigReader)1 ControllerJmsDelegate (org.apache.qpid.disttest.jms.ControllerJmsDelegate)1 Command (org.apache.qpid.disttest.message.Command)1 RegisterClientCommand (org.apache.qpid.disttest.message.RegisterClientCommand)1 Response (org.apache.qpid.disttest.message.Response)1 StopClientCommand (org.apache.qpid.disttest.message.StopClientCommand)1 Before (org.junit.Before)1 ArgumentMatchers.anyString (org.mockito.ArgumentMatchers.anyString)1 InvocationOnMock (org.mockito.invocation.InvocationOnMock)1