Documentation
¶
Overview ¶
Package dedupetest is the conformance suite every dedupe backend runs: the Deduplicator contract (dedupe.go) as tests, driven through the production path — a backend's Factory and the Managed switch it returns — so a backend that passes here behaves the same under ingest as every other.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Harness ¶
type Harness struct {
// Factory builds a tenant's store over the backend. The suite switches
// each store it builds on and closes it at cleanup.
Factory dedupe.Factory
// Peer, if set, builds a tenant's store over the same data through a
// second client — another process's view, for backends that have one.
// nil uses Factory.
Peer dedupe.Factory
// Advance moves the backend's clock forward by d. nil makes the suite
// sleep instead, which is why its leases and retentions are whole
// seconds: a backend may store expiry at one-second resolution.
Advance func(d time.Duration)
// FailNextReserve, if set, makes the backend's next Reserve fail after it
// has claimed n keys. nil skips the case that needs it.
FailNextReserve func(n int)
}
Harness is one fresh backend under test.
Click to show internal directories.
Click to hide internal directories.