DelayedWovenLoom

A test Loom whose Seams start in SeamState.Weaving and only transition to SeamState.Woven when DelayedWovenSeam.markWoven is called explicitly.

This harness reproduces the radio-fabric timing window — the state where weave() has returned but the fabric link is not yet live — in a fully deterministic, in-memory environment. Use it to verify that consumers (e.g. SeamRoom) correctly await SeamState.Woven before transmitting, rather than assuming the seam is live immediately after weave() returns.

Usage

val loom = DelayedWovenLoom()
val seam = loom.host(pattern) // state == Weaving
// ... seam is Weaving here ...
(seam as DelayedWovenSeam).markWoven() // state → Woven

Frame routing is in-memory. broadcast and sendTo deliver frames to all other seams on the same loom regardless of SeamState — this lets tests inspect whether frames sent while SeamState.Weaving ever arrive.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

Test hook: the seams woven by this loom, in weave order.

Functions

Link copied to clipboard
open override fun availability(): FabricAvailability
Link copied to clipboard
open suspend fun host(pattern: Pattern): Seam
Link copied to clipboard
open suspend fun join(tag: Tag): Seam
Link copied to clipboard
open suspend override fun weave(rendezvous: Rendezvous): Seam