public void awaitSuccess ( ) throws Exception { FutureTask < Void > futureTask = results . poll ( 5 , TimeUnit . SECONDS ) ; if ( futureTask == null ) throw new AssertionError ( "no onRequest call received" ) ; futureTask . get ( 5 , TimeUnit . SECONDS ) ; }
Returns once the duplex conversation completes successfully .