Skip to content

Commit 2010e94

Browse files
committed
Remove duplicate test
Reply timeout is already tested in `testGood()`.
1 parent fbd9cfc commit 2010e94

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

Comments
 (0)