Skip to content

Feat/reassembler#8

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

Feat/reassembler#8
David-A-T-M merged 2 commits into
masterfrom
feat/reassembler

Conversation

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

This pull request introduces a new PageReassembler class to the router simulator and provides comprehensive unit tests for its behavior. The PageReassembler is responsible for collecting packets belonging to a single page, detecting when all packets have arrived, and assembling them into a complete page. The tests cover all key aspects of its functionality and edge cases.

Core functionality:
Page reassembly and management

  • Added the PageReassembler class, which tracks packets for a specific page, manages their positions, detects completion, and assembles the page when all packets are received. Includes expiry logic based on simulation ticks. (src/main/java/ar/edu/unc/david/routersimulator/service/PageReassembler.java)

Testing and validation:
Unit tests for correctness

  • Added PageReassemblerTest with thorough coverage, including constructor validation, packet addition and rejection, completion detection, expiry checks, equality, hash code, and string representation. (src/test/java/ar/edu/unc/david/routersimulator/service/PageReassemblerTest.java)

@David-A-T-M David-A-T-M self-assigned this Mar 16, 2026
@David-A-T-M David-A-T-M linked an issue Mar 16, 2026 that may be closed by this pull request
4 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 b013ee9 into master Mar 16, 2026
2 checks passed
@David-A-T-M David-A-T-M deleted the feat/reassembler branch March 16, 2026 12:55
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 PageReassembler

1 participant