diff --git a/spring-kafka/src/test/java/org/springframework/kafka/requestreply/ReplyingKafkaTemplateTests.java b/spring-kafka/src/test/java/org/springframework/kafka/requestreply/ReplyingKafkaTemplateTests.java index aa0cd39385..b48dc732eb 100644 --- a/spring-kafka/src/test/java/org/springframework/kafka/requestreply/ReplyingKafkaTemplateTests.java +++ b/spring-kafka/src/test/java/org/springframework/kafka/requestreply/ReplyingKafkaTemplateTests.java @@ -286,37 +286,6 @@ public void testGoodSamePartition() throws Exception { } } - @SuppressWarnings("unchecked") - @Test - public void testTimeout() throws Exception { - ReplyingKafkaTemplate template = createTemplate(A_REPLY); - try { - template.setDefaultReplyTimeout(Duration.ofMillis(1)); - ProducerRecord record = new ProducerRecord<>(A_REQUEST, "fiz"); - record.headers().add(new RecordHeader(KafkaHeaders.REPLY_TOPIC, A_REPLY.getBytes())); - RequestReplyFuture future = template.sendAndReceive(record); - future.getSendFuture().get(10, TimeUnit.SECONDS); // send ok - try { - future.get(30, TimeUnit.SECONDS); - fail("Expected Exception"); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw e; - } - catch (ExecutionException e) { - assertThat(e) - .hasCauseExactlyInstanceOf(KafkaReplyTimeoutException.class) - .hasMessageContaining("Reply timed out"); - } - assertThat(KafkaTestUtils.getPropertyValue(template, "futures", Map.class)).isEmpty(); - } - finally { - template.stop(); - template.destroy(); - } - } - @Test public void testGoodWithSimpleMapper() throws Exception { ReplyingKafkaTemplate template = createTemplate(B_REPLY);