246247248249250251252253254255256
} } } }); channel.waitFor(ClientChannel.CLOSED, 0); assertEquals(nbMessages * message.length, baosOut.size()); } @Test
138139140141142143144145146147148
session.reExchangeKeys(); } teeOut.write("exit\n".getBytes()); teeOut.flush(); channel.waitFor(ClientChannel.CLOSED, 0); channel.close(false); client.stop(); assertArrayEquals(sent.toByteArray(), out.toByteArray());
194195196197198199200201202203204
teeOut.flush(); } teeOut.write("exit\n".getBytes()); teeOut.flush(); channel.waitFor(ClientChannel.CLOSED, 0); channel.close(false); client.stop(); assertTrue("Expected rekeying", exchanges.get() > 0);