((Peer)channel).join(); ((Peer)channel2).join();
((DistributedChannel)channel).join(); ((DistributedChannel)channel2).join();
   public void testNonRecoverableDistributedChannel_39() throws Throwable   {      if (channel.isRecoverable())      {         // we test only non-recoverable channels now         return;      }      jchannel2.connect("testGroup");      // allow the group time to form      Thread.sleep(1000);      assertTrue(jchannel.isConnected());      assertTrue(jchannel2.isConnected());      // make sure both jchannels joined the group      assertEquals(2, jchannel.getView().getMembers().size());      assertEquals(2, jchannel2.getView().getMembers().size());      ((Peer)channel).join();      ((Peer)channel2).join();      // add an NACKING receiver to the channel      SimpleReceiver r = new SimpleReceiver("NackingReceiver", SimpleReceiver.NACKING);      assertTrue(channel2.add(r));      Message m = Factory.createMessage("message0", false, "payload");      SimpleDeliveryObserver observer = new SimpleDeliveryObserver();      Transaction tx = tr.createTransaction();      // transacted send, non-reliable message, one message      // for a transactional send, handle() return value is unspecified      channel.handle(observer, m, tx);      // no messages in the channel      assertEquals(0, channel.browse().size());      assertEquals(0, channel2.browse().size());      // no message at the receiver      assertTrue(r.getMessages().isEmpty());      tx.commit();      List delivering = channel.browse();      assertEquals(1, delivering.size());      assertEquals("message0", ((Message)delivering.get(0)).getMessageID());      delivering = channel2.browse();      assertEquals(1, delivering.size());      assertEquals("message0", ((Message)delivering.get(0)).getMessageID());      List acknowledging = r.getMessages();      assertEquals(1, acknowledging.size());      Message ackm = (Message)acknowledging.get(0);      assertEquals("message0", ackm.getMessageID());      // non-transacted acknowledgment      r.acknowledge(ackm, null);      assertTrue(channel.browse().isEmpty());      assertTrue(channel2.browse().isEmpty());   }