_resuResultsFileWriter = new ResultsFileWriter(outputDir);
}
private void runTests(ControllerJmsDelegate jmsDelegate)
{
Controller controller = new Controller(jmsDelegate, DistributedTestConstants.REGISTRATION_TIMEOUT, DistributedTestConstants.COMMAND_RESPONSE_TIMEOUT);
String testConfigPath = getCliOptions().get(ControllerRunner.TEST_CONFIG_PROP);
List<String> testConfigFiles = _configFileHelper.getTestConfigFiles(testConfigPath);
createClientsIfNotDistributed(testConfigFiles);
try
{
List<ResultsForAllTests> results = new ArrayList<ResultsForAllTests>();
for (String testConfigFile : testConfigFiles)
{
final Config testConfig = buildTestConfigFrom(testConfigFile);
controller.setConfig(testConfig);
controller.awaitClientRegistrations();
LOGGER.info("Running test : " + testConfigFile);
ResultsForAllTests testResult = runTest(controller, testConfigFile);
results.add(testResult);
}
_resuResultsFileWriter.writeResultsSummary(results);
}
catch(Exception e)
{
LOGGER.error("Problem running test", e);
}
finally
{
controller.stopAllRegisteredClients();
}
}