question: private void pauseForClientToJoin ( ) { Wait . pause ( 2000 ) ; }
target:  The joined event fires when the first client handshake is processed. This pauses long enough to allow the rest of the client sockets to complete handshaking before making the client leave. Without doing this subsequent socket handshakes that are processed could fire join events after departure events and then a departure event again. If you see failures in testClientMembershipEventsInServer, try increasing this timeout.