Skip to content

MultiPacketWorld::process_messages overwrites messages instead of accumulating them #355

@coderabbitai

Description

@coderabbitai

Issue Description

In the MultiPacketWorld implementation (tests/world.rs line 230), the process_messages method uses direct assignment instead of extending messages:

self.messages = collect_multi_packet(resp).await;

This means if process_messages is called multiple times on the same MultiPacketWorld instance, previous messages will be overwritten rather than accumulated.

Expected Behavior

Messages should be accumulated across multiple calls to process_messages to preserve existing test behavior.

Proposed Solution

Change the direct assignment to extend the existing messages:

self.messages.extend(collect_multi_packet(resp).await);

Context

This issue was identified during the review of PR #352 which extracted the shared MultiPacket test helper. While the helper extraction was successful, this behavioral change was introduced as a side effect.

References

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions