185186187188189190191192193194195
future.get(1, TimeUnit.SECONDS); Assert.fail(); } catch(Exception expected) { // } client.shutdownNow(); // channel close() would make it fail // channels.getClientChannel().close(); try { future.get(); Assert.fail();