@@ -286,37 +286,6 @@ public void testGoodSamePartition() throws Exception {
286286 }
287287 }
288288
289- @ SuppressWarnings ("unchecked" )
290- @ Test
291- public void testTimeout () throws Exception {
292- ReplyingKafkaTemplate <Integer , String , String > template = createTemplate (A_REPLY );
293- try {
294- template .setDefaultReplyTimeout (Duration .ofMillis (1 ));
295- ProducerRecord <Integer , String > record = new ProducerRecord <>(A_REQUEST , "fiz" );
296- record .headers ().add (new RecordHeader (KafkaHeaders .REPLY_TOPIC , A_REPLY .getBytes ()));
297- RequestReplyFuture <Integer , String , String > future = template .sendAndReceive (record );
298- future .getSendFuture ().get (10 , TimeUnit .SECONDS ); // send ok
299- try {
300- future .get (30 , TimeUnit .SECONDS );
301- fail ("Expected Exception" );
302- }
303- catch (InterruptedException e ) {
304- Thread .currentThread ().interrupt ();
305- throw e ;
306- }
307- catch (ExecutionException e ) {
308- assertThat (e )
309- .hasCauseExactlyInstanceOf (KafkaReplyTimeoutException .class )
310- .hasMessageContaining ("Reply timed out" );
311- }
312- assertThat (KafkaTestUtils .getPropertyValue (template , "futures" , Map .class )).isEmpty ();
313- }
314- finally {
315- template .stop ();
316- template .destroy ();
317- }
318- }
319-
320289 @ Test
321290 public void testGoodWithSimpleMapper () throws Exception {
322291 ReplyingKafkaTemplate <Integer , String , String > template = createTemplate (B_REPLY );
0 commit comments