Documentation
¶
Overview ¶
Package conformance provides a reusable test suite for implementations of the messaging Publisher and Subscriber ports.
Transport adapters call Run from their own tests. The suite uses real time, so it works for adapters that perform network I/O; adapters that are purely in-process may also run it inside a testing/synctest bubble.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
Run verifies an at-least-once publish/subscribe round trip: the subscriber receives and acknowledges the message with its ID, payload and headers preserved, and Subscribe keeps running until its context ends.
Publish and Subscribe share one context with a one-second deadline, so a context-aware adapter fails the test instead of hanging it. Run publishes the same envelope repeatedly until it is delivered, so adapters that register subscriptions asynchronously need no test-only synchronization.