runJob(createDefaultDrainJob(queueName)); warmupDestination(queueName, standardMessageSize, false, DeliveryMode.NON_PERSISTENT, Session.AUTO_ACKNOWLEDGE);   FillJob fillJob = createDefaultFillJob(queueName, numMessages); fillJob.setDeliveryMode(DeliveryMode.NON_PERSISTENT); fillJob.setMsgSize(standardMessageSize); fillJob.setMf(new BytesMessageMessageFactory()); runJob(fillJob);  BrowserJob job  = createDefaultBrowserJob(queueName); JobTimings result = runJob(job);  Execution execution = createExecution("Queue18");  execution.addMeasurement(new Measurement("messagesPerSec", 1000 * (double)numMessages / result.getTestTime()));  pm.saveExecution(execution);  log.info("Test Queue18 finished");
try {  FillJob fillJob = createDefaultFillJob(queueName, numMessages); fillJob.setDeliveryMode(DeliveryMode.NON_PERSISTENT); fillJob.setMsgSize(standardMessageSize); fillJob.setMf(new BytesMessageMessageFactory()); runJob(fillJob);  BrowserJob job  = createDefaultBrowserJob(queueName); JobResult result = runJob(job);  if (!checkResult(result, "Queue18")) { return; }  Execution execution = createExecution("Queue18");  execution.addMeasurement(new Measurement("messagesPerSec", 1000 * (double)numMessages / result.testTime));  pm.saveExecution(execution);  log.info("Test Queue18 finished"); } finally { drainQueue(queueName); }
   public void testQueue18()   {      log.info("Running test Queue18");            //First drain the destination      runJob(createDefaultDrainJob(queueName));      warmupDestination(queueName, standardMessageSize, false, DeliveryMode.NON_PERSISTENT, Session.AUTO_ACKNOWLEDGE);            //Now fill it with numMessages messages      FillJob fillJob = createDefaultFillJob(queueName, numMessages);      fillJob.setDeliveryMode(DeliveryMode.NON_PERSISTENT);      fillJob.setMsgSize(standardMessageSize);      fillJob.setMf(new BytesMessageMessageFactory());      runJob(fillJob);            BrowserJob job  = createDefaultBrowserJob(queueName);      JobTimings result = runJob(job);            Execution execution = createExecution("Queue18");            execution.addMeasurement(new Measurement("messagesPerSec", 1000 * (double)numMessages / result.getTestTime()));            pm.saveExecution(execution);            log.info("Test Queue18 finished");   }