You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Neha Narkhede (Commented) (JIRA)" <ji...@apache.org> on 2011/11/06 20:09:51 UTC

[jira] [Commented] (KAFKA-192) CompressionUtilTest does not run and fails when it does

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

Neha Narkhede commented on KAFKA-192:
-------------------------------------

+1. Excellent ! thanks for the patch. Just committed this.
                
> CompressionUtilTest does not run and fails when it does
> -------------------------------------------------------
>
>                 Key: KAFKA-192
>                 URL: https://issues.apache.org/jira/browse/KAFKA-192
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Joe Stein
>         Attachments: kafka-192.patch
>
>
> CompressionUtilTest does not run the functions inside of it during ./sbt test
> if you change CompressionUtilTest to extend JUnitSuite then the existing functions run (once you adorne them with @Test) but then fail ...
> I suspect the TestUtils.checkEquals(messages.iterator, decompressedMessages.iterator) is failing in testSimpleCompressDecompress because all of the messages are serialized into byte arrays and the entire set of messages compressed and that new compressed messages is what is returned as one message instead of the List[Message] and therefor are not interpreted within TestUtil.checkEquals to see this nuance.
> e.g.
> [error] Test Failed: testSimpleCompressDecompress
> junit.framework.AssertionFailedError: expected:<message(magic = 1, attributes = 0, crc = 3819140844, payload = java.nio.HeapByteBuffer[pos=0 lim=8 cap=8])> but was:<MessageAndOffset(message(magic = 1, attributes = 0, crc = 3819140844, payload = java.nio.HeapByteBuffer[pos=0 lim=8 cap=8]),18)>
> and
> [error] Test Failed: testComplexCompressDecompress
> junit.framework.AssertionFailedError: expected:<2> but was:<3>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira