Skip to main content

protocol/testing/conformance/transport

packages/protocol/src/testing/conformance/transport

Purpose

Public barrel for transport-layer conformance properties. Transport-layer conformance properties. Lifecycle transport invariants — adversity around latency, connection-reset, timeout, and close. Each register* lives in its own file. This barrel re-exports them by name AND aggregates them into TRANSPORT_PROPERTIES for the _shared/suite.ts aggregator.

Public surface

acquireProxiedClient

Function
Acquire an agent client that routes through the Toxiproxy proxy. Returns: The acquire proxied client result.

ADVERSITY_CATEGORY

Variable
Provides the adversity category runtime value.

adversityViolation

Function
Executes the adversity violation operation. Returns: The adversity violation result.

createOneOnOneConversation

Function
Creates one on one conversation. Returns: The created one on one conversation.

proxyName

Function
Executes the proxy name operation. Returns: The proxy name result.

registerLatencyResilience

Function
Registers latency resilience.

registerResetPeerRecovery

Function
Registers reset peer recovery.

registerSlowCloseCleanup

Function
Registers slow close cleanup.

registerTimeoutSurface

Function
Registers timeout surface.

ToxicBodyParams

Interface
Body params — attachToxic attaches the toxic inside the caller’s scope. Nesting matters: the caller typically does.
So the toxic is removed BEFORE the agent client’s socket close. Under disruptive toxics (timeout, reset_peer), this lets the WS close handshake flow cleanly instead of hanging on a black-holed channel.

TRANSPORT_PROPERTIES

Variable
All transport-layer property registrars, in the order _shared/suite.ts invokes them.

withToxicProxy

Function
Factory — wire a Toxiproxy proxy + attach the toxic; hand a body the proxy. Hard-deadlines each property body so a hanging toxic can’t block the suite indefinitely; if the deadline fires, the property reports PropertyUnavailable (not a pass, not a crash).

Files

  • _helpers.ts
  • adversity-latency-resilience.ts
  • adversity-reset-peer-recovery.ts
  • adversity-slow-close-cleanup.ts
  • adversity-timeout-surface.ts
  • index.ts