Skip to content

Commit 6dae2f1

Browse files
committed
Remove duplicate test
Reply timeout is already tested in `testGood()`.
1 parent 5747b50 commit 6dae2f1

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

spring-kafka/src/test/java/org/springframework/kafka/requestreply/ReplyingKafkaTemplateTests.java

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -338,37 +338,6 @@ public void testGoodSamePartition() throws Exception {
338338
}
339339
}
340340

341-
@SuppressWarnings("unchecked")
342-
@Test
343-
public void testTimeout() throws Exception {
344-
ReplyingKafkaTemplate<Integer, String, String> template = createTemplate(A_REPLY);
345-
try {
346-
template.setDefaultReplyTimeout(Duration.ofMillis(1));
347-
ProducerRecord<Integer, String> record = new ProducerRecord<>(A_REQUEST, "fiz");
348-
record.headers().add(new RecordHeader(KafkaHeaders.REPLY_TOPIC, A_REPLY.getBytes()));
349-
RequestReplyFuture<Integer, String, String> future = template.sendAndReceive(record);
350-
future.getSendFuture().get(10, TimeUnit.SECONDS); // send ok
351-
try {
352-
future.get(30, TimeUnit.SECONDS);
353-
fail("Expected Exception");
354-
}
355-
catch (InterruptedException e) {
356-
Thread.currentThread().interrupt();
357-
throw e;
358-
}
359-
catch (ExecutionException e) {
360-
assertThat(e)
361-
.hasCauseExactlyInstanceOf(KafkaReplyTimeoutException.class)
362-
.hasMessageContaining("Reply timed out");
363-
}
364-
assertThat(KafkaTestUtils.getPropertyValue(template, "futures", Map.class)).isEmpty();
365-
}
366-
finally {
367-
template.stop();
368-
template.destroy();
369-
}
370-
}
371-
372341
@Test
373342
public void testGoodWithSimpleMapper() throws Exception {
374343
ReplyingKafkaTemplate<Integer, String, String> template = createTemplate(B_REPLY);

0 commit comments

Comments
 (0)