Package org.apache.qpid.disttest.message

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


    }

    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 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

        _command.setNumberOfMessages(numberOfMessages);
        _command.setBatchSize(batchSize);
        _command.setDeliveryMode(deliveryMode);

        ParticipantResult result = _producer.doIt(CLIENT_NAME);
        assertExpectedProducerResults(result, PARTICIPANT_NAME1, CLIENT_NAME, _testStartTime,
                                      Session.AUTO_ACKNOWLEDGE, null, numberOfMessages, PAYLOAD_SIZE_PER_MESSAGE, totalPayloadSize, null);

        _inOrder.verify(_delegate).sendNextMessage(isA(CreateProducerCommand.class));
        _inOrder.verify(_delegate).calculatePayloadSizeFrom(_mockMessage);
View Full Code Here

    public void testSendMessagesForDuration() throws Exception
    {
        final long duration = 1000;
        _command.setMaximumDuration(duration);

        ParticipantResult result = _producer.doIt(CLIENT_NAME);
        assertExpectedProducerResults(result, PARTICIPANT_NAME1, CLIENT_NAME, _testStartTime,
                                      Session.AUTO_ACKNOWLEDGE, null, null, PAYLOAD_SIZE_PER_MESSAGE, null, duration);

        verify(_delegate, atLeastOnce()).sendNextMessage(isA(CreateProducerCommand.class));
        verify(_delegate, atLeastOnce()).calculatePayloadSizeFrom(_mockMessage);
View Full Code Here

        long totalPayloadSize = PAYLOAD_SIZE_PER_MESSAGE * numberOfMessages;

        _command.setNumberOfMessages(numberOfMessages);
        _command.setBatchSize(batchSize);

        ParticipantResult result = _producer.doIt(CLIENT_NAME);
        assertExpectedProducerResults(result, PARTICIPANT_NAME1, CLIENT_NAME, _testStartTime,
                                      Session.AUTO_ACKNOWLEDGE, batchSize, numberOfMessages, PAYLOAD_SIZE_PER_MESSAGE, totalPayloadSize, null);

        verify(_delegate, times(numberOfMessages)).sendNextMessage(isA(CreateProducerCommand.class));
        verify(_delegate, times(numberOfMessages)).calculatePayloadSizeFrom(_mockMessage);
View Full Code Here

        _command.setNumberOfMessages(numberOfMessages);
        _command.setBatchSize(batchSize);
        _command.setInterval(publishInterval);

        ParticipantResult result = _producer.doIt(CLIENT_NAME);
        assertExpectedProducerResults(result, PARTICIPANT_NAME1, CLIENT_NAME, _testStartTime,
                                      Session.AUTO_ACKNOWLEDGE, null, numberOfMessages, null, totalPayloadSize, expectedTimeToRunTest);

        verify(_delegate, times(numberOfMessages)).sendNextMessage(isA(CreateProducerCommand.class));
        verify(_delegate, times(numberOfMessages)).calculatePayloadSizeFrom(_mockMessage);
View Full Code Here

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

        _command.setNumberOfMessages(numberOfMessages);

        ParticipantResult result = _producer.doIt(CLIENT_NAME);

        final int expectedPayloadResultPayloadSize = 0;
        assertExpectedProducerResults(result, PARTICIPANT_NAME1, CLIENT_NAME, _testStartTime,
                                      Session.AUTO_ACKNOWLEDGE, null, numberOfMessages, expectedPayloadResultPayloadSize, totalPayloadSize, null);
View Full Code Here

        }
    }

    public ParticipantResult getAggregatedResult()
    {
        ParticipantResult aggregatedResult;
        if (_targetClass == ConsumerParticipantResult.class)
        {
            ConsumerParticipantResult consumerParticipantResult = new ConsumerParticipantResult(_aggregatedResultName);
            consumerParticipantResult.setAverageLatency(_latencyStatistics.getAverage());
            consumerParticipantResult.setMinLatency(_latencyStatistics.getMinimum());
            consumerParticipantResult.setMaxLatency(_latencyStatistics.getMaximum());
            consumerParticipantResult.setLatencyStandardDeviation(_latencyStatistics.getStandardDeviation());
            aggregatedResult = consumerParticipantResult;
        }
        else
        {
            aggregatedResult = new ParticipantResult(_aggregatedResultName);
        }

        setRolledUpConstantAttributes(aggregatedResult);
        setComputedVariableAttributes(aggregatedResult);
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.