예제 #1
0
  private void init(AMQConnection connection, AMQDestination destination) throws Exception {
    _connection = connection;
    _destination = destination;
    _session = (AMQSession) connection.createSession(false, AMQSession.NO_ACKNOWLEDGE);

    // set up a slow consumer
    _session.createConsumer(destination).setMessageListener(this);
    connection.start();

    // _expected = new FieldTableTest().load("FieldTableTest2.properties");
    _expected = load();
  }
예제 #2
0
 public void test() throws Exception {
   int count = _count;
   _waitForCompletion = new CountDownLatch(_count);
   send(count);
   _waitForCompletion.await(20, TimeUnit.SECONDS);
   check();
   _logger.info("Completed without failure");
   _connection.close();
 }