Documentation
¶
Overview ¶
Package storedir gives a test a directory for the embedded message broker's store. It imports nothing from the repository, so internal/mq's own tests can use it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New returns an empty directory under t.TempDir for a broker's store, removed once the broker is closed: New's cleanup runs after the test's own, Close among them (cleanups run last-in, first-out).
A closed broker's store is not yet quiescent: the embedded NATS server writes each durable consumer's state from a goroutine its Shutdown does not join, so a write under way can land after Close has returned — failing t.TempDir's one-shot RemoveAll with "directory not empty" (#442). There is nothing to wait on, so the removal is tried again whenever a directory was refilled between reading and removing it. That ends without a clock: those writes add a bounded number of entries, and none once their directory is gone.
Types ¶
This section is empty.