public void testBAandBCbrokerNetwork() throws Exception {
  bridgeBrokers("BrokerB","BrokerA");
  bridgeBrokers("BrokerB","BrokerC");
  startAllBrokers();
  waitForBridgeFormation();
  Destination dest=createDestination("TEST.FOO",false);
  MessageConsumer clientA=createConsumer("BrokerA",dest);
  MessageConsumer clientC=createConsumer("BrokerC",dest);
  Thread.sleep(2000);
  sendMessages("BrokerB",dest,MESSAGE_COUNT);
  Thread.sleep(1000);
  MessageIdList msgsA=getConsumerMessages("BrokerA",clientA);
  MessageIdList msgsC=getConsumerMessages("BrokerC",clientC);
  assertEquals(MESSAGE_COUNT,msgsA.getMessageCount() + msgsC.getMessageCount());
}

public void testBAandBCbrokerNetwork ( ) throws Exception { bridgeBrokers ( "BrokerB" , "BrokerA" ) ; bridgeBrokers ( "BrokerB" , "BrokerC" ) ; startAllBrokers ( ) ; waitForBridgeFormation ( ) ; Destination dest = createDestination ( "TEST.FOO" , false ) ; MessageConsumer clientA = createConsumer ( "BrokerA" , dest ) ; MessageConsumer clientC = createConsumer ( "BrokerC" , dest ) ; Thread . sleep ( 2000 ) ; sendMessages ( "BrokerB" , dest , MESSAGE_COUNT ) ; Thread . sleep ( 1000 ) ; MessageIdList msgsA = getConsumerMessages ( "BrokerA" , clientA ) ; MessageIdList msgsC = getConsumerMessages ( "BrokerC" , clientC ) ; assertEquals ( MESSAGE_COUNT , msgsA . getMessageCount ( ) + msgsC . getMessageCount ( ) ) ; }
brokera < - brokerb - > brokerc
