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

nfilotto pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git


The following commit(s) were added to refs/heads/main by this push:
     new bd1b9eef025 camel-kafka - Set the correct partition id (#862)
bd1b9eef025 is described below

commit bd1b9eef0259568429e509257dfb755e4b319a9f
Author: Nicolas Filotto <essob...@users.noreply.github.com>
AuthorDate: Mon Jun 19 10:08:47 2023 +0200

    camel-kafka - Set the correct partition id (#862)
    
    ## Motivation
    
    The test `KafkaProducerFullIT#producedBytesMessageIsReceivedByKafka` fails 
due to a `TimeoutException` with the message `Topic testBytes not present in 
metadata after 60000 ms`.
    
    ## Modifications
    
    * Set the correct id of the existing partition which is `0`
---
 .../apache/camel/component/kafka/integration/KafkaProducerFullIT.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/components-starter/camel-kafka-starter/src/test/java/org/apache/camel/component/kafka/integration/KafkaProducerFullIT.java
 
b/components-starter/camel-kafka-starter/src/test/java/org/apache/camel/component/kafka/integration/KafkaProducerFullIT.java
index 04a884de53e..b6479f1bbff 100644
--- 
a/components-starter/camel-kafka-starter/src/test/java/org/apache/camel/component/kafka/integration/KafkaProducerFullIT.java
+++ 
b/components-starter/camel-kafka-starter/src/test/java/org/apache/camel/component/kafka/integration/KafkaProducerFullIT.java
@@ -282,11 +282,11 @@ public class KafkaProducerFullIT extends 
BaseEmbeddedKafkaTestSupport {
         CountDownLatch messagesLatch = new CountDownLatch(messageInTopic + 
messageInOtherTopic);
 
         Map<String, Object> inTopicHeaders = new HashMap<>();
-        inTopicHeaders.put(KafkaConstants.PARTITION_KEY, "1".getBytes());
+        inTopicHeaders.put(KafkaConstants.PARTITION_KEY, "0".getBytes());
         sendMessagesInRoute(messageInTopic, bytesTemplate, "IT test 
message".getBytes(), inTopicHeaders);
 
         Map<String, Object> otherTopicHeaders = new HashMap<>();
-        otherTopicHeaders.put(KafkaConstants.PARTITION_KEY, "1".getBytes());
+        otherTopicHeaders.put(KafkaConstants.PARTITION_KEY, "0".getBytes());
         otherTopicHeaders.put(KafkaConstants.TOPIC, TOPIC_BYTES_IN_HEADER);
         sendMessagesInRoute(messageInOtherTopic, bytesTemplate, "IT test 
message in other topic".getBytes(), otherTopicHeaders);
 

Reply via email to