Skip to content

Refactor TestServer into per-protocol namespaces #52

Open
richard-ash wants to merge 1 commit intomainfrom
richard/refactor-http-websocket
Open

Refactor TestServer into per-protocol namespaces #52
richard-ash wants to merge 1 commit intomainfrom
richard/refactor-http-websocket

Conversation

@richard-ash
Copy link
Collaborator

@richard-ash richard-ash commented Mar 6, 2026

TestServer's goal is to support any network protocol under a single, consistent testing API with a shared lifecycle management and ExUnit integration. Right now adding a new protocol is constrained because InstanceManager has HTTP-specific assumptions baked in, it hardcodes HTTP instance construction and teardown which makes it impossible to reuse for other protocols.

The natural evolution is to move protocol-specific logic into submodules (TestServer.PROTOCOL) while keeping InstanceManager and InstanceSupervisor as shared, protocol-agnostic infrastructure.

This PR decouples protocol-specific logic from shared infrastructure:

  • TestServer.HTTP— all HTTP/WebSocket public API and implementation, including server adapters under TestServer.HTTP.Server.*
  • TestServer.InstanceManager — now fully protocol-agnostic. Instances self-identify via a :protocol
    tag and modules filter by it

@richard-ash richard-ash force-pushed the richard/refactor-instance-manager branch from 7552ad4 to 91c6090 Compare March 6, 2026 21:36
@richard-ash richard-ash force-pushed the richard/refactor-http-websocket branch 2 times, most recently from 32abf17 to 4d32bb1 Compare March 6, 2026 22:00
@richard-ash richard-ash force-pushed the richard/refactor-instance-manager branch from 91c6090 to af202a5 Compare March 6, 2026 22:06
@richard-ash richard-ash force-pushed the richard/refactor-http-websocket branch from 4d32bb1 to 27672a8 Compare March 6, 2026 22:13
@richard-ash richard-ash changed the base branch from richard/refactor-instance-manager to main March 6, 2026 22:13
@richard-ash richard-ash requested a review from danschultzer March 6, 2026 22:13
@richard-ash richard-ash marked this pull request as ready for review March 6, 2026 22:14
@richard-ash richard-ash force-pushed the richard/refactor-http-websocket branch 5 times, most recently from 49ccbd4 to c8a07d6 Compare March 7, 2026 01:30
@richard-ash richard-ash changed the title Refactor TestServer to TestServer.HTTP Refactor TestServer into per-protocol namespaces Mar 7, 2026
@richard-ash richard-ash force-pushed the richard/refactor-http-websocket branch 2 times, most recently from e1919a5 to 409a973 Compare March 7, 2026 02:13
@richard-ash richard-ash force-pushed the richard/refactor-http-websocket branch from 409a973 to 634d354 Compare March 9, 2026 05:54
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.

1 participant