Skip to content

[Test] Fix AlignedWritableMemChunkTest compilation error - #18859

Merged
JackieTien97 merged 1 commit into
masterfrom
fix/AlignedWritableMemChunkTest-compile
Oct 14, 2026
Merged

JackieTien97 merged 1 commit into
masterfrom
fix/AlignedWritableMemChunkTest-compile

Conversation

@shuwenwei

Copy link
Copy Markdown
Member

Problem

The datanode test compilation fails after the API change to AlignedWritableMemChunk:

AlignedWritableMemChunkTest.java:[53,9] no suitable constructor found for AlignedWritableMemChunk(java.util.ArrayList<...>,boolean)
  constructor AlignedWritableMemChunk(List<IMeasurementSchema>, EncryptParameter) is not applicable
  constructor AlignedWritableMemChunk(List<IMeasurementSchema>, AlignedTVList) is not applicable
AlignedWritableMemChunkTest.java:[97,32] method deserialize in class AlignedWritableMemChunk cannot be applied to given types;
  required: java.io.DataInputStream
  found:    java.io.DataInputStream,boolean

Cause

AlignedWritableMemChunkTest was added in #18816, when AlignedWritableMemChunk's constructor took a second boolean isTableModel parameter and deserialize took a trailing boolean. A later change replaced the boolean with EncryptParameter and dropped the argument from deserialize(DataInputStream), but this test was not updated, so it no longer compiles.

Fix

Drop the removed argument in the 4 constructor calls and in deserialize(...), using the single-argument constructor (which defaults to EncryptUtils.getEncryptParameter()) and deserialize(DataInputStream).

AlignedWritableMemChunk's constructor second parameter was changed from
boolean isTableModel to EncryptParameter, and deserialize(DataInputStream,
boolean) was reduced to deserialize(DataInputStream), but the test added in
#18816 was not updated accordingly, breaking test compilation.

Update the test to use the single-argument constructor and
deserialize(DataInputStream).
@shuwenwei

Copy link
Copy Markdown
Member Author
截屏2026-10-14 11 20 01

@JackieTien97
JackieTien97 merged commit 72b4d16 into master Oct 14, 2026
38 of 39 checks passed
@JackieTien97
JackieTien97 deleted the fix/AlignedWritableMemChunkTest-compile branch October 14, 2026 03:22
@codecov

codecov Bot commented Oct 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 45.94%. Comparing base (491d9b3) to head (302294c).
⚠️ Report is 7 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #18859      +/-   ##
============================================
+ Coverage     45.93%   45.94%   +0.01%     
  Complexity      712      712              
============================================
  Files          5502     5502              
  Lines        398935   398970      +35     
  Branches      52002    52015      +13     
============================================
+ Hits         183237   183318      +81     
+ Misses       215698   215652      -46     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants