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