Skip to content

Add tests for WebSocket broadcast isolation – clients only receive their own stream events #314

@ritik4ever

Description

@ritik4ever

The WebSocket server broadcasts events to connected clients. There are no tests verifying that a client subscribed to stream A does not receive events for stream B owned by a different user.
Implementation:
Create backend/src/services/websocket.isolation.test.ts:

Connect two clients with different wallet addresses
Trigger a stream event for client A's stream
Assert client B does not receive the message
Assert client A does receive the message with correct payload shape

Acceptance Criteria:

Cross-user event isolation is verified in tests
Message payload shape is asserted (stream ID, event type, timestamp)
No broadcast leakage between unrelated clients

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions