Skip to content

Feat/packetbuffer#10

Merged
David-A-T-M merged 2 commits into
masterfrom
feat/packetbuffer
Mar 18, 2026
Merged

Feat/packetbuffer#10
David-A-T-M merged 2 commits into
masterfrom
feat/packetbuffer

Conversation

@David-A-T-M
Copy link
Copy Markdown
Owner

This pull request introduces a new PacketBuffer class for managing packets in a FIFO queue, along with comprehensive unit tests for its functionality. Additionally, it expands the test coverage for the PageReassembler class by adding tests for slot validity and equality logic.

New infrastructure: Packet buffer

  • Added the PacketBuffer class in PacketBuffer.java, providing a generic bounded or unbounded FIFO queue for Packet objects with methods for enqueue, dequeue, peek, capacity management, and buffer inspection.

Test coverage improvements

  • Introduced PacketBufferTest.java with thorough unit tests covering all buffer operations, edge cases, and error handling for the new PacketBuffer class.
  • Added tests in PageReassemblerTest.java to verify hasPacketAt() returns correct results for valid and invalid slots, including out-of-bounds checks.
  • Added a test in PageReassemblerTest.java to ensure equals() returns false for instances with different page IDs, improving equality logic coverage.

…packet queues

- test: add `PacketBufferTest` with comprehensive unit tests for `PacketBuffer` functionality
@David-A-T-M David-A-T-M self-assigned this Mar 18, 2026
@David-A-T-M David-A-T-M linked an issue Mar 18, 2026 that may be closed by this pull request
10 tasks
Copy link
Copy Markdown
Owner Author

@David-A-T-M David-A-T-M left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ready to merge

@David-A-T-M David-A-T-M merged commit 893153a into master Mar 18, 2026
2 checks passed
@David-A-T-M David-A-T-M deleted the feat/packetbuffer branch March 18, 2026 12:40
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.

feat PacketBuffer

1 participant