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

divijv pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 1e8d445664b MINOR: fix typo in MemoryRecordsBuilderTest (#15098)
1e8d445664b is described below

commit 1e8d445664b0d5a7f1db994b04980f382cb0fd95
Author: LiangliangSui <[email protected]>
AuthorDate: Fri Dec 29 23:51:12 2023 +0800

    MINOR: fix typo in MemoryRecordsBuilderTest (#15098)
    
    Fix typo in MemoryRecordsBuilderTest.java
    
    Reviewers: Divij Vaidya <[email protected]>
---
 .../java/org/apache/kafka/common/record/MemoryRecordsBuilderTest.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/clients/src/test/java/org/apache/kafka/common/record/MemoryRecordsBuilderTest.java
 
b/clients/src/test/java/org/apache/kafka/common/record/MemoryRecordsBuilderTest.java
index 5616fb23f7d..33a419e64ee 100644
--- 
a/clients/src/test/java/org/apache/kafka/common/record/MemoryRecordsBuilderTest.java
+++ 
b/clients/src/test/java/org/apache/kafka/common/record/MemoryRecordsBuilderTest.java
@@ -327,8 +327,8 @@ public class MemoryRecordsBuilderTest {
             if (args.compressionType == CompressionType.NONE) {
                 assertEquals(1.0, builder.compressionRatio(), 0.00001);
             } else {
-                int recordHeaad = magic == MAGIC_VALUE_V0 ? 
LegacyRecord.RECORD_OVERHEAD_V0 : LegacyRecord.RECORD_OVERHEAD_V1;
-                int compressedSize = built.sizeInBytes() - 
Records.LOG_OVERHEAD - recordHeaad;
+                int recordHead = magic == MAGIC_VALUE_V0 ? 
LegacyRecord.RECORD_OVERHEAD_V0 : LegacyRecord.RECORD_OVERHEAD_V1;
+                int compressedSize = built.sizeInBytes() - 
Records.LOG_OVERHEAD - recordHead;
                 double computedCompressionRate = (double) compressedSize / 
uncompressedSize;
                 assertEquals(computedCompressionRate, 
builder.compressionRatio(), 0.00001);
             }

Reply via email to