Search in sources :

Example 36 with ParticipantResult

use of org.apache.qpid.disttest.message.ParticipantResult in project qpid-broker-j by apache.

the class ParticipantResultAggregatorTest method testConstantTestNameAndIterationNumberRolledUp.

@Test
public void testConstantTestNameAndIterationNumberRolledUp() throws Exception {
    ParticipantResult result1 = new ParticipantResult();
    result1.setTestName(TEST_NAME);
    result1.setIterationNumber(TEST_ITERATION_NUMBER);
    ParticipantResult result2 = new ParticipantResult();
    result2.setTestName(TEST_NAME);
    result2.setIterationNumber(TEST_ITERATION_NUMBER);
    _aggregator.aggregate(result1);
    _aggregator.aggregate(result2);
    ParticipantResult aggregatedResult = _aggregator.getAggregatedResult();
    assertEquals((long) TEST_ITERATION_NUMBER, (long) aggregatedResult.getIterationNumber());
    assertEquals(TEST_NAME, aggregatedResult.getTestName());
}
Also used : ParticipantResult(org.apache.qpid.disttest.message.ParticipantResult) Test(org.junit.Test)

Example 37 with ParticipantResult

use of org.apache.qpid.disttest.message.ParticipantResult in project qpid-broker-j by apache.

the class ParticipantResultAggregatorTest method testDifferingAcknowledgeModesNotRolledUp.

@Test
public void testDifferingAcknowledgeModesNotRolledUp() throws Exception {
    ParticipantResult result1 = new ParticipantResult();
    result1.setBatchSize(Session.AUTO_ACKNOWLEDGE);
    ParticipantResult result2 = new ParticipantResult();
    result2.setBatchSize(Session.SESSION_TRANSACTED);
    _aggregator.aggregate(result1);
    _aggregator.aggregate(result2);
    ParticipantResult aggregatedResult = _aggregator.getAggregatedResult();
    assertEquals((long) -1, (long) aggregatedResult.getAcknowledgeMode());
}
Also used : ParticipantResult(org.apache.qpid.disttest.message.ParticipantResult) Test(org.junit.Test)

Example 38 with ParticipantResult

use of org.apache.qpid.disttest.message.ParticipantResult in project qpid-broker-j by apache.

the class ResultsTestFixture method getFirstParticipantResult.

public ParticipantResult getFirstParticipantResult(ResultsForAllTests results) {
    List<ITestResult> testResults = results.getTestResults();
    ITestResult testResult = testResults.iterator().next();
    List<ParticipantResult> participantResults = testResult.getParticipantResults();
    return participantResults.iterator().next();
}
Also used : ParticipantResult(org.apache.qpid.disttest.message.ParticipantResult) ITestResult(org.apache.qpid.disttest.results.aggregation.ITestResult)

Aggregations

ParticipantResult (org.apache.qpid.disttest.message.ParticipantResult)38 Test (org.junit.Test)25 ConsumerParticipantResult (org.apache.qpid.disttest.message.ConsumerParticipantResult)9 ProducerParticipantResult (org.apache.qpid.disttest.message.ProducerParticipantResult)9 ITestResult (org.apache.qpid.disttest.results.aggregation.ITestResult)6 Date (java.util.Date)5 TestResult (org.apache.qpid.disttest.controller.TestResult)4 ResultsForAllTests (org.apache.qpid.disttest.controller.ResultsForAllTests)3 File (java.io.File)2 ArrayList (java.util.ArrayList)2 Message (javax.jms.Message)2 ParticipantAttribute (org.apache.qpid.disttest.message.ParticipantAttribute)2 TreeSet (java.util.TreeSet)1 MessageListener (javax.jms.MessageListener)1 Context (javax.naming.Context)1 DocumentBuilder (javax.xml.parsers.DocumentBuilder)1 ParserConfigurationException (javax.xml.parsers.ParserConfigurationException)1 Transformer (javax.xml.transform.Transformer)1 TransformerException (javax.xml.transform.TransformerException)1 DOMSource (javax.xml.transform.dom.DOMSource)1