Examples of ParticipantResult


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

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

        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

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

    private void assertTestResultMessageSize(TestResult testResult, int iterationNumber, int expectedMessageSize, int expectedNumberOfMessages)
    {
        List<ParticipantResult> test1ParticipantResults = testResult.getParticipantResults();
        assertEquals("Unexpected number of participant results for test", 2, test1ParticipantResults.size());

        ParticipantResult producer1 = test1ParticipantResults.get(1);

        assertEquals(expectedMessageSize, producer1.getPayloadSize());
        assertEquals(iterationNumber, producer1.getIterationNumber());
    }
View Full Code Here

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

        assertEquals("Size of list of expected participant names is different from actual", expectedOrderedParticipantNames.length, participants.size());

        for (int i = 0; i < expectedOrderedParticipantNames.length; i++)
        {
            String expectedParticipantName = expectedOrderedParticipantNames[i];
            ParticipantResult participant = participants.get(i);
            assertEquals(expectedParticipantName, participant.getParticipantName());
        }
    }
View Full Code Here

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

            assertTrue("Unexpected message", m instanceof TextMessage);
        }
        Message m = _consumer.receive(500l);
        assertNull("Unexpected message", m);

        ParticipantResult results = _controllerQueue.getNext();

        assertNotNull("no results", results);
        assertFalse(results.getStartInMillis() == 0);
        assertFalse(results.getEndInMillis() == 0);
    }
View Full Code Here

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

    {
        Map<CommandType, Command> responses = new HashMap<CommandType, Command>();
        _controllerQueue.addNextResponse(responses);
        _controllerQueue.addNextResponse(responses);

        ParticipantResult results = (ParticipantResult) responses.get(expectedParticipantResultCommandType);
        validateResponse(null, results, true);

        Response startTestResponse = (Response) responses.get(CommandType.RESPONSE);
        validateResponse(CommandType.START_TEST, startTestResponse, true);
    }
View Full Code Here

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

            _producer.send(message);
        }

        new ParticipantExecutor(consumerParticipant).start(_client);

        ParticipantResult results = _controllerQueue.getNext();
        assertNotNull("No results message recieved", results);
        assertEquals("Unexpected number of messages received", 10, results.getNumberOfMessagesProcessed());

        Session testQueueConsumerSession = _connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        final MessageConsumer testQueueConsumer = testQueueConsumerSession.createConsumer(getTestQueue());
        for (int i = 0; i < 10; i++)
        {
View Full Code Here

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

            _producer.send(_session.createMessage());
        }

        new ParticipantExecutor(consumerParticipant).start(_client);

        ParticipantResult results = _controllerQueue.getNext();
        assertNotNull("No results message recieved", results);

        Session testQueueConsumerSession = _connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        final MessageConsumer testQueueConsumer = testQueueConsumerSession.createConsumer(getTestQueue());
        Message message = testQueueConsumer.receive(2000);
View Full Code Here

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

    }

    public void testCreateForError()
    {
        String errorMessage = "error";
        ParticipantResult result = _participantResultFactory.createForError(PARTICIPANT_NAME, REGISTERED_CLIENT_NAME, errorMessage);
        assertEquals(PARTICIPANT_NAME, result.getParticipantName());
        assertEquals(REGISTERED_CLIENT_NAME, result.getRegisteredClientName());
    }
View Full Code Here

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

    {
        int numberOfMessages = 1;
        long totalPayloadSize = PAYLOAD_SIZE_PER_MESSAGE * numberOfMessages;
        _command.setNumberOfMessages(numberOfMessages);

        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
TOP
Copyright © 2018 www.massapi.com. 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.