platinumhamburg commented on code in PR #778:
URL: https://github.com/apache/fluss/pull/778#discussion_r2265629828


##########
fluss-common/src/test/java/com/alibaba/fluss/record/MemoryLogRecordsArrowBuilderTest.java:
##########
@@ -95,7 +96,7 @@ void testAppendWithEmptyRecord() throws Exception {
         assertThat(iterator.hasNext()).isTrue();
         LogRecordBatch batch = iterator.next();
         assertThat(batch.getRecordCount()).isEqualTo(0);
-        assertThat(batch.sizeInBytes()).isEqualTo(48);
+        assertThat(batch.sizeInBytes()).isEqualTo(52);

Review Comment:
   The hard coded test should be parameterized.



##########
fluss-common/src/test/java/com/alibaba/fluss/record/MemoryLogRecordsArrowBuilderTest.java:
##########
@@ -201,7 +202,7 @@ void testIllegalArgument() {
                         })
                 .isInstanceOf(IllegalArgumentException.class)
                 .hasMessage(
-                        "The size of first segment of pagedOutputView is too 
small, need at least 48 bytes.");
+                        "The size of first segment of pagedOutputView is too 
small, need at least 52 bytes.");

Review Comment:
   The hard coded test should be parameterized.



##########
fluss-client/src/test/java/com/alibaba/fluss/client/table/scanner/log/DefaultCompletedFetchTest.java:
##########
@@ -227,7 +228,7 @@ private DefaultCompletedFetch makeCompletedFetch(
     private MemoryLogRecords createMemoryLogRecords(List<Object[]> objects, 
LogFormat logFormat)
             throws Exception {
         return createRecordsWithoutBaseLogOffset(
-                rowType, DEFAULT_SCHEMA_ID, 0L, 1000L, objects, logFormat);
+                rowType, DEFAULT_SCHEMA_ID, 0L, 1000L, 
CURRENT_LOG_MAGIC_VALUE, objects, logFormat);
     }
 
     private MemoryLogRecords genRecordsWithProjection(List<Object[]> objects, 
Projection projection)

Review Comment:
   Maybe we need to pass the magic value as parameters to support parameterized 
test cases.



##########
fluss-common/src/test/java/com/alibaba/fluss/record/MemoryLogRecordsArrowBuilderTest.java:
##########
@@ -254,7 +255,7 @@ void testNoRecordAppend() throws Exception {
                 createMemoryLogRecordsArrowBuilder(0, writer, 10, 1024 * 10);
         MemoryLogRecords memoryLogRecords = 
MemoryLogRecords.pointToBytesView(builder.build());
         // only contains batch header.
-        assertThat(memoryLogRecords.sizeInBytes()).isEqualTo(48);
+        assertThat(memoryLogRecords.sizeInBytes()).isEqualTo(52);

Review Comment:
   same as above



##########
fluss-common/src/test/java/com/alibaba/fluss/record/MemoryLogRecordsArrowBuilderTest.java:
##########
@@ -279,7 +280,7 @@ void testNoRecordAppend() throws Exception {
         builder = createMemoryLogRecordsArrowBuilder(100, writer2, 10, 1024 * 
10);
         memoryLogRecords = MemoryLogRecords.pointToBytesView(builder.build());
         // only contains batch header.
-        assertThat(memoryLogRecords.sizeInBytes()).isEqualTo(48);
+        assertThat(memoryLogRecords.sizeInBytes()).isEqualTo(52);

Review Comment:
   same as above



-- 
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]

Reply via email to