use of org.apache.qpid.disttest.message.ParticipantResult in project qpid-broker-j by apache.
the class TestResultAggregator method aggregateOriginalResults.
private boolean aggregateOriginalResults(ITestResult originalTestResult, ParticipantResultAggregator consumerParticipantResultAggregator, ParticipantResultAggregator producerParticipantResultAggregator) {
boolean hasError = false;
for (ParticipantResult result : originalTestResult.getParticipantResults()) {
consumerParticipantResultAggregator.aggregate(result);
producerParticipantResultAggregator.aggregate(result);
if (result.hasError()) {
hasError = true;
}
}
return hasError;
}
use of org.apache.qpid.disttest.message.ParticipantResult in project qpid-broker-j by apache.
the class TestResultAggregator method aggregateAggregatedResults.
private ParticipantResult aggregateAggregatedResults(ParticipantResultAggregator aggregatedResultsAggregator, ParticipantResult aggregatedProducerResult, ParticipantResult aggregaredConsumerResult) {
aggregatedResultsAggregator.aggregate(aggregatedProducerResult);
aggregatedResultsAggregator.aggregate(aggregaredConsumerResult);
ParticipantResult aggregatedAllResult = aggregatedResultsAggregator.getAggregatedResult();
return aggregatedAllResult;
}
use of org.apache.qpid.disttest.message.ParticipantResult in project qpid-broker-j by apache.
the class CSVFormatter method format.
public String format(List<ITestResult> results) {
StringBuilder builder = new StringBuilder();
builder.append(header());
for (ITestResult testResult : results) {
List<ParticipantResult> participantResults = new ArrayList<ParticipantResult>(testResult.getParticipantResults());
Collections.sort(participantResults, new CSVOrderParticipantResultComparator());
for (ParticipantResult participantResult : participantResults) {
Map<ParticipantAttribute, Object> attributes = participantResult.getAttributes();
builder.append(row(attributes));
}
}
return builder.toString();
}
use of org.apache.qpid.disttest.message.ParticipantResult in project qpid-broker-j by apache.
the class OrdinaryTestRunnerTest method testSuccessfulTestRunReturnsTestResult.
@Test
public void testSuccessfulTestRunReturnsTestResult() {
ParticipantResult participantResult = new ParticipantResult(PARTICIPANT_NAME);
configureMockToReturnResponseTo(CreateConnectionCommand.class, new Response(CLIENT1_REGISTERED_NAME, CommandType.CREATE_CONNECTION), null);
configureMockToReturnResponseTo(StartTestCommand.class, new Response(CLIENT1_REGISTERED_NAME, CommandType.START_TEST), null);
configureMockToReturnResponseTo(StartDataCollectionCommand.class, new Response(CLIENT1_REGISTERED_NAME, CommandType.START_DATA_COLLECTION), participantResult);
configureMockToReturnResponseTo(TearDownTestCommand.class, new Response(CLIENT1_REGISTERED_NAME, CommandType.TEAR_DOWN_TEST), null);
_testInstance = createTestInstanceWithConnection();
_testRunner = new OrdinaryTestRunner(_participatingClients, _testInstance, _respondingJmsDelegate, COMMAND_RESPONSE_TIMEOUT, TEST_RESULT_TIMEOUT);
TestResult testResult = _testRunner.run();
assertNotNull(testResult);
assertEquals("Unexpected number of participant results", (long) 1, (long) testResult.getParticipantResults().size());
}
use of org.apache.qpid.disttest.message.ParticipantResult in project qpid-broker-j by apache.
the class ParticipantResultAggregatorTest method testConstantProviderVersionRolledUp.
@Test
public void testConstantProviderVersionRolledUp() throws Exception {
String providerVersion = "PROVIDER_VERSION";
ParticipantResult result1 = new ParticipantResult();
result1.setProtocolVersion(providerVersion);
ParticipantResult result2 = new ParticipantResult();
result2.setProtocolVersion(providerVersion);
_aggregator.aggregate(result1);
_aggregator.aggregate(result2);
ParticipantResult aggregatedResult = _aggregator.getAggregatedResult();
assertEquals(providerVersion, aggregatedResult.getProtocolVersion());
}
Aggregations