Skip to content

Commit 9a33485

Browse files
committed
Remove duplicate test
Reply timeout is already tested in `testGood()`.
1 parent feac8d2 commit 9a33485

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
@@ -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

Comments
 (0)