Skip to content

Improve unit tests for zstd decompression functionality #1009

@coderabbitai

Description

@coderabbitai

Description

This issue tracks the need to create more exhaustive and robust unit tests for the zstd decompression functionality, specifically for the Decompressor class in components/core/src/clp/streaming_compression/zstd/.

Context

During the review of PR #977 (which fixes zstd internal buffer exhaustion), it was decided to defer comprehensive unit tests to a separate PR to make them more thorough and robust.

Tasks

  • Add comprehensive unit tests for the Decompressor::try_read() method
  • Add unit tests for the new Decompressor::refill_compressed_stream_block() method
  • Test edge cases around frame continuation (m_zstd_frame_might_have_more_data)
  • Test various input types (CompressedDataBuf, MemoryMappedCompressedFile, ReaderInterface)
  • Test error handling scenarios
  • Test buffer exhaustion and refill scenarios

References

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions