Skip to content

Add automated tests for handshake, message flow, and shutdown behavior #2

@dennisvink

Description

@dennisvink

Summary

The repository currently ships core protocol logic without an automated test suite.

Why this matters

This package implements stateful transport behavior, async event dispatching, cookie/session handling, and request/response framing. These areas are all regression-prone, especially when evolving protocol support.

Recommended minimum coverage

  • handshake success/failure paths
  • forward channel message encoding/decoding
  • backchannel chunk parsing
  • event dispatch behavior for sync and async listeners
  • shutdown behavior, especially around injected vs internally-created HTTP clients
  • error propagation on HTTP 4xx/5xx and timeout cases

Suggested approach

Add pytest-based tests with mocked httpx transports or stubbed async clients so protocol flows can be validated without live network dependencies.

Impact

Without tests, future changes to WebChannel framing and lifecycle behavior are likely to introduce silent protocol regressions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions