}</BUG>
catch(TimeoutException te) {
Assert.fail("Test timed out before all messages were received") ;
}
}
<BUG>private long getNumMessagesSentViaNetwork(JChannel ch) throws Exception {

TP transport = (TP) ch.getProtocolStack().getTransport();
if (transport == null) {</BUG>
throw new Exception("transport layer is not present - check default stack configuration") ;

channel.send(new Message(local_addr, null, new Integer(i)));
if(i % 100 == 0)
System.out.println("-- sent " + i);
}
num_msgs_sent_after = getNumMessagesSentViaNetwork(channel) ;
System.out.println("num msgs before: " + num_msgs_sent_before + ", num msgs after: " + num_msgs_sent_after);
assert num_msgs_sent_before <= num_msgs_sent_after;
assert num_msgs_sent_after < NUM/10;
try {
p.getResultWithTimeout(TIMEOUT) ;
}
catch(TimeoutException te) {
Assert.fail("Test timed out before all messages were received") ;
