Documentation
¶
Overview ¶
Package readbarrier synchronizes a test fixture server with the owned provider transport's socket reads. Only tests import it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Barrier ¶
type Barrier struct {
// contains filtered or unexported fields
}
Barrier lets a fixture server write its next record only after the client has consumed every byte already sent and is reading the socket again: the deterministic form of a Node fixture's timer between writes, which always outlasts the client's microtask drain.
func New ¶
New installs read hooks until t ends. Install it once per test function; parallel subtests share it and are told apart by client address.
Click to show internal directories.
Click to hide internal directories.