This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 3d199dec6b0 CAMEL-20680 - cut down test execution time removing 
producer.send to partition 1 (was unused)
3d199dec6b0 is described below

commit 3d199dec6b0a68cfb86deb677f88b1c92404296c
Author: Jang-Vijay Singh <jvs...@gmail.com>
AuthorDate: Wed May 1 13:14:18 2024 +0100

    CAMEL-20680 - cut down test execution time removing producer.send to 
partition 1 (was unused)
    
    With explicit partition 1, the producer.send operation was taking 60
    seconds on each iteration. (and there are 7 iterations for partition 1).
    But there is no explicit assertion checking for messages sent to
    partition 1. The assertion in the main test testCamel19894TestFix only
    checks for partition 0.
---
 .../kafka/integration/KafkaBreakOnFirstErrorSeekIssueIT.java      | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git 
a/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/integration/KafkaBreakOnFirstErrorSeekIssueIT.java
 
b/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/integration/KafkaBreakOnFirstErrorSeekIssueIT.java
index 4d98b547d14..f56bfc92354 100644
--- 
a/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/integration/KafkaBreakOnFirstErrorSeekIssueIT.java
+++ 
b/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/integration/KafkaBreakOnFirstErrorSeekIssueIT.java
@@ -163,15 +163,11 @@ class KafkaBreakOnFirstErrorSeekIssueIT extends 
BaseExclusiveKafkaTestSupport {
         final List<String> producedRecordsPartition1 = List.of("5", "6", "7", 
"8", "9", "10", "11");
         final List<String> producedRecordsPartition0 = List.of("1", "2", "3", 
"4");
 
-        producedRecordsPartition1.forEach(v -> {
-            ProducerRecord<String, String> data = new ProducerRecord<>(TOPIC, 
1, null, null, v);
-            producer.send(data);
-        });
-
         producedRecordsPartition0.forEach(v -> {
-            ProducerRecord<String, String> data = new ProducerRecord<>(TOPIC, 
0, null, null, v);
+            ProducerRecord<String, String> data = new ProducerRecord<>(TOPIC, 
0, "k0", v); //CAMEL-20680: kept explicit partition 0, added key.
             producer.send(data);
         });
+
     }
 
 }

Reply via email to