[ 
https://issues.apache.org/jira/browse/KAFKA-2839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15031299#comment-15031299
 ] 

jin xing commented on KAFKA-2839:
---------------------------------

I believe there is a bug in KafkaBasedLogTest implementation;
Records are appended to "KafkaBasedLog" by :
consumer.addRecord(new ConsumerRecord<>(TOPIC, 0, 0, TP0_KEY, TP0_VALUE));
consumer.addRecord(new ConsumerRecord<>(TOPIC, 0, 1, TP0_KEY, TP0_VALUE_NEW));
consumer.addRecord(new ConsumerRecord<>(TOPIC, 1, 0, TP1_KEY, TP1_VALUE));
consumer.addRecord(new ConsumerRecord<>(TOPIC, 1, 1, TP1_KEY, TP1_VALUE_NEW));
and achieved by "consumedRecords";
Inside of "ConsumerRecords", in order to turn "records", which is a HashMap>>, 
into Iterator>;
We can just guarantee the sequence underneath same key, while we cannot assure 
the sequence under different keys;
Am I wrong?
I already make a pull request for this fix;
[~gwenshap]

> Kafka connect log test failing
> ------------------------------
>
>                 Key: KAFKA-2839
>                 URL: https://issues.apache.org/jira/browse/KAFKA-2839
>             Project: Kafka
>          Issue Type: Sub-task
>            Reporter: Gwen Shapira
>
> org.apache.kafka.connect.util.KafkaBasedLogTest > testSendAndReadToEnd FAILED
>     org.junit.ComparisonFailure: expected:<VAL[0]> but was:<VAL[1]>
>         at org.junit.Assert.assertEquals(Assert.java:115)
>         at org.junit.Assert.assertEquals(Assert.java:144)
>         at 
> org.apache.kafka.connect.util.KafkaBasedLogTest.testSendAndReadToEnd(KafkaBasedLogTest.java:312)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to