Package org.apache.qpid.disttest.message

Examples of org.apache.qpid.disttest.message.ParticipantResult


        _command.setNumberOfMessages(numberOfMessages);

        when(_delegate.calculatePayloadSizeFrom(_mockMessage)).thenReturn(firstPayloadSize, secondPayloadSize, thirdPayloadSize);

        ParticipantResult result = _consumerParticipant.doIt(CLIENT_NAME);

        final int expectedPayloadResultPayloadSize = 0;
        final long totalPayloadSize = firstPayloadSize + secondPayloadSize + thirdPayloadSize;
        assertExpectedConsumerResults(result, PARTICIPANT_NAME1, CLIENT_NAME, _testStartTime,
                                      Session.CLIENT_ACKNOWLEDGE, null, numberOfMessages, expectedPayloadResultPayloadSize, totalPayloadSize, null);
View Full Code Here


        int numberOfMessages = 1;
        long totalPayloadSize = PAYLOAD_SIZE_PER_MESSAGE * numberOfMessages;
        _command.setNumberOfMessages(numberOfMessages);
        _command.setEvaluateLatency(true);
        _consumerParticipant = new ConsumerParticipant(_delegate, _command);
        ParticipantResult result = _consumerParticipant.doIt(CLIENT_NAME);

        assertExpectedConsumerResults(result, PARTICIPANT_NAME1, CLIENT_NAME, _testStartTime,
                                      Session.CLIENT_ACKNOWLEDGE, null, numberOfMessages, PAYLOAD_SIZE_PER_MESSAGE, totalPayloadSize, null);

        _inOrder.verify(_delegate).consumeMessage(PARTICIPANT_NAME1, RECEIVE_TIMEOUT);
View Full Code Here

        verify(_participantRegistry).clear();
    }

    public void testResults() throws Exception
    {
        ParticipantResult testResult = mock(ParticipantResult.class);
        _client.sendResults(testResult);
        verify(_delegate).sendResponseMessage(testResult);
    }
View Full Code Here

    public void testProducerPrecedesAllProducersResult()
    {
        assertCompare(
                new ProducerParticipantResult("participantName"),
                new ParticipantResult(TestResultAggregator.ALL_PRODUCER_PARTICIPANTS_NAME));
    }
View Full Code Here

    public void testConsumerPrecedesAllConsumersResult()
    {
        assertCompare(
                new ConsumerParticipantResult("participantName"),
                new ParticipantResult(TestResultAggregator.ALL_CONSUMER_PARTICIPANTS_NAME));
    }
View Full Code Here

    }

    public void testAllParticipantsPrecedesAllConsumersResult()
    {
        assertCompare(
                new ParticipantResult(TestResultAggregator.ALL_PARTICIPANTS_NAME),
                new ParticipantResult(TestResultAggregator.ALL_CONSUMER_PARTICIPANTS_NAME));
    }
View Full Code Here

    }

    public void testAllParticipantsPrecedesAllProducersResult()
    {
        assertCompare(
                new ParticipantResult(TestResultAggregator.ALL_PARTICIPANTS_NAME),
                new ParticipantResult(TestResultAggregator.ALL_PRODUCER_PARTICIPANTS_NAME));
    }
View Full Code Here

    private CSVFormatter _formatter = new CSVFormatter();

    public void testResultsFileWithWithOneRow() throws Exception
    {
        ParticipantResult participantResult = mock(ParticipantResult.class);
        Map<ParticipantAttribute, Object> participantAttributes = getParticipantAttributes();

        when(participantResult.getAttributes()).thenReturn(participantAttributes);
        when(participantResult.getParticipantName()).thenReturn(PARTICIPANT);

        TestResult testResult = new TestResult(TEST1);
        testResult.addParticipantResult(participantResult);

        ResultsForAllTests resultsForAllTests = new ResultsForAllTests();
View Full Code Here

    private static class ResultHasError extends ArgumentMatcher<ParticipantResult>
    {
        @Override
        public boolean matches(Object argument)
        {
            ParticipantResult result = (ParticipantResult) argument;
            return result.hasError();
        }
View Full Code Here

        long totalPayloadSize = PAYLOAD_SIZE_PER_MESSAGE * numberOfMessages;

        _command.setStartDelay(delay);
        _command.setNumberOfMessages(numberOfMessages);

        ParticipantResult result = _producer.doIt(CLIENT_NAME);

        long expectedPublishedStartTime = _testStartTime + delay;
        assertExpectedProducerResults(result, PARTICIPANT_NAME1, CLIENT_NAME, expectedPublishedStartTime, Session.AUTO_ACKNOWLEDGE, null, numberOfMessages, PAYLOAD_SIZE_PER_MESSAGE, totalPayloadSize, null);
    }
View Full Code Here

TOP

Related Classes of org.apache.qpid.disttest.message.ParticipantResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.