Package org.apache.qpid.disttest

Examples of org.apache.qpid.disttest.DistributedTestException


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


                }
                catch (final Exception e2)
                {
                    // ignore
                }
                throw new DistributedTestException("Error starting test: " + _clientJmsDelegate.getClientName(), e);
            }
        }
        else
        {
            throw new DistributedTestException("Client '" + _clientJmsDelegate.getClientName()
                            + "' is not in READY state:" + _state.get());
        }
    }
View Full Code Here

            _clientJmsDelegate.tearDownTest();
        }
        else
        {
            throw new DistributedTestException("Client '" + _clientJmsDelegate.getClientName() + "' is not in RUNNING_TEST state! Ignoring tearDownTest");
        }


        _participantRegistry.clear();
    }
View Full Code Here

        long numberOfMessages = _command.getNumberOfMessages();
        long maximumDuration = _command.getMaximumDuration();

        if (maximumDuration == 0 && numberOfMessages == 0)
        {
            throw new DistributedTestException("number of messages and duration cannot both be zero");
        }

        long duration = maximumDuration - _command.getStartDelay();
        if (maximumDuration > 0 && duration <= 0)
        {
            throw new DistributedTestException("Start delay must be less than maximum test duration");
        }
        final long requiredDuration = duration > 0 ? duration : 0;

        doSleepForStartDelay();
View Full Code Here

            LOGGER.debug("Created queue {}", queueConfig);
        }
        catch (Exception e)
        {
            throw new DistributedTestException("Failed to create queue:" + queueConfig, e);
        }
    }
View Full Code Here

            session.sendQueueDelete(queueName);
            LOGGER.debug("Deleted queue {}", queueName);
        }
        catch (Exception e)
        {
            throw new DistributedTestException("Failed to delete queue:" + queueName, e);
        }
    }
View Full Code Here

            final JsonHandler jsonHandler = new JsonHandler();
            jmsMessage.setStringProperty(DistributedTestConstants.MSG_JSON_PROPERTY, jsonHandler.marshall(command));
        }
        catch (final JMSException jmse)
        {
            throw new DistributedTestException("Unable to convert command " + command + " to JMS Message", jmse);
        }

        return jmsMessage;
    }
View Full Code Here

            command = jsonHandler.unmarshall(jmsMessage.getStringProperty(DistributedTestConstants.MSG_JSON_PROPERTY),
                            getCommandClassFromType(commandType));
        }
        catch (final JMSException jmse)
        {
            throw new DistributedTestException("Unable to convert JMS message " + jmsMessage + " to command object",
                            jmse);
        }
        return command;
    }
View Full Code Here

            case PRODUCER_PARTICIPANT_RESULT:
                return ProducerParticipantResult.class;
            case CREATE_MESSAGE_PROVIDER:
                return CreateMessageProviderCommand.class;
            default:
                throw new DistributedTestException("No class defined for type: " + type);
        }
    }
View Full Code Here

            engine.eval(new FileReader(fileName));
            engine.eval("jsonString = JSON.stringify(" + TEST_CONFIG_VARIABLE_NAME + ")");
        }
        catch (ScriptException e)
        {
            throw new DistributedTestException("Exception while evaluating test config", e);
        }
        String result = (String) engine.get("jsonString");

        LOGGER.debug("Evaluated javascript file " + fileName + ". Generated the following JSON: " + result);
        return result;
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.