UnreadableGrants

constructor(probe: suspend () -> Unit, probeWrite: suspend () -> Unit, restore: suspend () -> Boolean)

Parameters

probe

reads the grants record straight off the medium, bypassing the store; while the record is unreadable it must throw. The property requires that it does, so a rig that broke nothing reds rather than passes.

probeWrite

writes a sibling record — never the grants record — straight to the medium through the same backend, in the same place, while the grants record is unreadable; it must return. The property requires that it does, so a rig that faulted the whole medium reds rather than leaves the rewrite check with nothing to catch.

restore

puts the record back within reach, and answers whether anything wrote, replaced or removed the record while it was unreadable. The suite calls it exactly once, in a finally.