((Peer)channel).join(); ((Peer)channel2).join();
((DistributedChannel)channel).join(); ((DistributedChannel)channel2).join();
   public void testNonRecoverableDistributedChannel_28_race() 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);      r.setImmediateAsynchronousAcknowledgment(true);      assertTrue(channel2.add(r));      Message m = Factory.createMessage("message0", false, "payload");      SimpleDeliveryObserver observer = new SimpleDeliveryObserver();      // non-transacted send, non-reliable message, one message      Delivery delivery = channel.handle(observer, m, null);      assertTrue(delivery.isDone());      // the receiver should have returned a "done" delivery      assertTrue(channel.browse().isEmpty());      assertTrue(channel2.browse().isEmpty());      List messages = r.getMessages();      assertEquals(1, messages.size());      Message ackm = (Message)messages.get(0);      assertEquals("message0", ackm.getMessageID());      // an extra acknowledgment should be discarded      r.acknowledge(ackm, null);      assertTrue(channel.browse().isEmpty());      assertTrue(channel2.browse().isEmpty());   }