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.
Background
XXHash32Wrapperclass 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
XXHash32Wrapperclass.core/src/main/kotlin/com/kakao/actionbase/core/codec/XXHash32Wrapper.kt(35 LOC)hash(bytes, offset, length)- Hash byte array with offset and lengthstringHash(string)- Hash string valueinsertTsHash/deleteTsHash- Verify constant hash valuescreate(seed)- Factory method with custom seedDone When
core/src/test/kotlin/com/kakao/actionbase/core/codec/XXHash32WrapperTest.kt./gradlew :core:test.Notes
Suggested test cases:
hash()returns consistent value for same inputhash()returns different values for different inputsstringHash()returns consistent value for same stringinsertTsHashanddeleteTsHashare stable across instancesReference:
core/src/test/kotlin/com/kakao/actionbase/core/codec/EdgeIndexMapperTest.ktPlease comment below and request assignment if you would like to work on this.