Package org.apache.qpid.disttest

Examples of org.apache.qpid.disttest.DistributedTestException


                }
            });
        }
        catch (final JMSException e)
        {
            throw new DistributedTestException(e);
        }
    }
View Full Code Here


        {
            _connection.close();
        }
        catch (JMSException e)
        {
            throw new DistributedTestException("Unable to close connection", e);
        }
    }
View Full Code Here

    public void sendCommandToClient(final String clientName, final Command command)
    {
        final Destination clientQueue = _clientNameToQueueMap.get(clientName);
        if (clientQueue == null)
        {
            throw new DistributedTestException("Client name " + clientName + " not known. I know about: "
                            + _clientNameToQueueMap.keySet());
        }

        try
        {
            final MessageProducer producer = _session.createProducer(clientQueue);
            final Message message = JmsMessageAdaptor.commandToMessage(_session, command);

            producer.send(message);
        }
        catch (final JMSException e)
        {
            throw new DistributedTestException(e);
        }
    }
View Full Code Here

        {
            clientIntructionQueue = _session.createQueue(clientQueueName);
        }
        catch (JMSException e)
        {
            throw new DistributedTestException("Unable to create Destination from " + clientQueueName);
        }
        return clientIntructionQueue;
    }
View Full Code Here

        final Date start = new Date();
        final int acknowledgeMode = _jmsDelegate.getAcknowledgeMode(_command.getSessionName());

        if (_command.getMaximumDuration() == 0 && _command.getNumberOfMessages() == 0)
        {
            throw new DistributedTestException("number of messages and duration cannot both be zero");
        }

        if (_command.isSynchronous())
        {
            synchronousRun();
View Full Code Here

                {
                    mesageTimestamp = message.getJMSTimestamp();
                }
                catch (JMSException e)
                {
                    throw new DistributedTestException("Cannot get message timestamp!", e);
                }
                long latency = System.currentTimeMillis() - mesageTimestamp;
                _messageLatencies.add(latency);
            }
View Full Code Here

    private void rethrowAnyAsyncMessageListenerException()
    {
        if (_asyncMessageListenerException != null)
        {
            throw new DistributedTestException(_asyncMessageListenerException);
        }
    }
View Full Code Here

        final int numberOfAbsentClients = _clientRegistry.awaitClients(_config.getTotalNumberOfClients(), _registrationTimeout);
        if (numberOfAbsentClients > 0)
        {
            String formattedMessage = String.format("Timed out waiting for registrations. Expecting %d more registrations", numberOfAbsentClients);
            throw new DistributedTestException(formattedMessage);
        }

    }
View Full Code Here

    private void validateConfiguration()
    {
        if (_config == null || _config.getTotalNumberOfClients() == 0)
        {
            throw new DistributedTestException("No controller config or no clients specified in test config");
        }
    }
View Full Code Here

            final boolean countedDownOK = latch.await(timeout, TimeUnit.MILLISECONDS);
            if (!countedDownOK)
            {
                final long latchCount = latch.getCount();
                String formattedMessage = String.format(messageWithOneDecimalPlaceholder, latchCount);
                throw new DistributedTestException(formattedMessage);
            }
        }
        catch (final InterruptedException e)
        {
            Thread.currentThread().interrupt();
View Full Code Here

TOP

Related Classes of org.apache.qpid.disttest.DistributedTestException

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.