Beispiel #1
0
 @Test
 public void testCloseAfterConnectCall() throws IOException {
   String connectionId =
       selector.connect(
           new InetSocketAddress("localhost", server.port),
           BUFFER_SIZE,
           BUFFER_SIZE,
           PortType.SSL);
   selector.close(connectionId);
   selector.poll(0);
   Assert.assertTrue(
       "Channel should have been added to disconnected list",
       selector.disconnected().contains(connectionId));
 }
Beispiel #2
0
 @After
 public void teardown() throws Exception {
   selector.close();
   server.close();
 }