Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Non-Deterministic Test - testChunkCache #14099

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mohitbadve
Copy link

@mohitbadve mohitbadve commented Nov 14, 2024

Description

The test ChunkCacheTest#testChunkCache fails under NonDex tool which detects non-deterministic nature of tests.

How to Reproduce

mvn -pl iotdb-core/datanode edu.illinois:nondex-maven-plugin:2.1.7:nondex 
-Dtest=ChunkCacheTest#testChunkCache
-DnondexRuns=10

Error

java.lang.AssertionError:
expected: org.apache.tsfile.file.header.ChunkHeader<CHUNK_HEADER{measurementID='null', dataSize=189, dataType=DOUBLE, compressionType=UNCOMPRESSED, encodingType=PLAIN, numOfPages=0, serializedSize=14}>
but was: org.apache.tsfile.file.header.ChunkHeader<CHUNK_HEADER{measurementID='null', dataSize=189, dataType=DOUBLE, compressionType=UNCOMPRESSED, encodingType=PLAIN, numOfPages=0, serializedSize=14}>

Proposed Solution

Instead of asserting the objects directly, assert the objects' content as the objects might be different, but their content would be the same.
Please let me know if you have any questions or need any additional justification/changes from my side.


This PR has:

  • been self-reviewed.
    • concurrent read
    • concurrent write
    • concurrent read and write
  • added documentation for new or modified features or behaviors.
  • added Javadocs for most classes and all non-trivial methods.
  • added or updated version, license, or notice information
  • added comments explaining the "why" and the intent of the code wherever would not be obvious
    for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold
    for code coverage.
  • added integration tests.
  • been tested in a test IoTDB cluster.

Key changed/added classes (or packages if there are too many classes) in this PR

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.

1 participant