List of usage examples for io.netty.util.concurrent Promise await
@Override
Promise<V> await() throws InterruptedException;
From source file:com.turo.pushy.apns.AbstractClientServerTest.java
License:Open Source License
@AfterClass public static void tearDownAfterClass() throws Exception { final PromiseCombiner combiner = new PromiseCombiner(); combiner.addAll(CLIENT_EVENT_LOOP_GROUP.shutdownGracefully(), SERVER_EVENT_LOOP_GROUP.shutdownGracefully()); final Promise<Void> shutdownPromise = new DefaultPromise<>(GlobalEventExecutor.INSTANCE); combiner.finish(shutdownPromise);//w w w . j av a 2 s. c o m shutdownPromise.await(); }