Package org.apache.qpid.disttest

Examples of org.apache.qpid.disttest.DistributedTestException


    @Override
    public ParticipantResult doIt(String registeredClientName) throws Exception
    {
        if (_command.getMaximumDuration() == 0 && _command.getNumberOfMessages() == 0)
        {
            throw new DistributedTestException("number of messages and duration cannot both be zero");
        }

        int acknowledgeMode = _jmsDelegate.getAcknowledgeMode(_command.getSessionName());

        doSleepForStartDelay();
View Full Code Here



    void awaitTestResults()
    {
        long timeout = _testResultTimeout;
        DistributedTestException lastException = null;

        boolean waitForever = _testResultTimeout == WAIT_FOREVER;
        final long interval = waitForever ? PARTICIPANT_RESULTS_LOG_INTERVAL : Math.min(PARTICIPANT_RESULTS_LOG_INTERVAL, _testResultTimeout);

        while(_testResultsLatch.getCount() > 0 && (waitForever || timeout > 0))
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

    public void registerClient(String clientName)
    {
        final boolean alreadyContainsClient = !_registeredClientNames.add(clientName);
        if (alreadyContainsClient)
        {
            throw new DistributedTestException("Duplicate client name " + clientName);
        }

        notifyAllWaiters();

        if (LOGGER.isInfoEnabled())
View Full Code Here

    public void registerClient(String clientName)
    {
        final boolean alreadyContainsClient = !_registeredClientNames.add(clientName);
        if (alreadyContainsClient)
        {
            throw new DistributedTestException("Duplicate client name " + clientName);
        }

        synchronized (_lock)
        {
            _lock.notifyAll();
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

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

        {
            BeanUtils.setProperty(message, propertyName, propertyValue);
        }
        catch (IllegalAccessException e)
        {
            throw new DistributedTestException("Unable to set property " + propertyName + " :" + e.getMessage(), e);
        }
        catch (InvocationTargetException e)
        {
            if (e.getCause() instanceof JMSException)
            {
                throw ((JMSException) e.getCause());
            }
            else
            {
                throw new DistributedTestException("Unable to set property " + propertyName + " :" + e.getMessage(), e);
            }
        }
    }
View Full Code Here

        {
            payload = future.get();
        }
        catch (Exception e)
        {
            throw new DistributedTestException("Unable to create message payload :" + e.getMessage(), e);
        }
        return payload;
    }
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.