Skip to content

Add unit tests for XXHash32Wrapper #118

@em3s

Description

@em3s

Background

XXHash32Wrapper class lacks direct unit tests. While it is used in other tests (EdgeIndexMapperTest, EdgeStateMapperTest, V2MultiEdgeBulkLoadTest), there are no dedicated tests that verify its core functionality.

Task

  • Add unit tests for XXHash32Wrapper class.
  • File path: core/src/main/kotlin/com/kakao/actionbase/core/codec/XXHash32Wrapper.kt (35 LOC)
  • Test targets:
    • hash(bytes, offset, length) - Hash byte array with offset and length
    • stringHash(string) - Hash string value
    • insertTsHash / deleteTsHash - Verify constant hash values
    • create(seed) - Factory method with custom seed

Done When

  • Test file created at core/src/test/kotlin/com/kakao/actionbase/core/codec/XXHash32WrapperTest.kt
  • All public methods are covered with tests.
  • Tests pass with ./gradlew :core:test.

Notes

Suggested test cases:

  • hash() returns consistent value for same input
  • hash() returns different values for different inputs
  • stringHash() returns consistent value for same string
  • insertTsHash and deleteTsHash are stable across instances
  • Different seeds produce different hash values

Reference: core/src/test/kotlin/com/kakao/actionbase/core/codec/EdgeIndexMapperTest.kt

Please comment below and request assignment if you would like to work on this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions