swamymavuri commented on code in PR #46:
URL: https://github.com/apache/pulsar-adapters/pull/46#discussion_r1144033792
##########
pulsar-client-kafka-compat/pulsar-client-kafka/src/test/java/org/apache/kafka/clients/producer/PulsarKafkaProducerTest.java:
##########
@@ -246,7 +248,13 @@ public void testPulsarKafkaSendAvro() throws
PulsarClientException {
foo.setField2("field2");
foo.setField3(3);
- pulsarKafkaProducer.send(new ProducerRecord<>("topic", 1,foo, bar));
+ Headers headers = new RecordHeaders();
+ String header1 = "header1";
+ String header2 = "header2";
+ headers.add(header1,header1.getBytes());
+ headers.add(header2,header2.getBytes());
+
+ pulsarKafkaProducer.send(new ProducerRecord<>("topic", 1,foo, bar,
headers));
Review Comment:
Hi @nareshv ,
Added KafkaConsumer test classes in`PulsarKafkaConsumerTest ` to cover the
code flow of header section along with the existing code flow.
As there are no integration test cases readily available for this to run
either with server/docker container. so validation of the headers in the
consumer is not possible at this moment.
I will raise an issue and we can work for integration test cases later.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]