LogStoreContractCheck class final
Drives a store under test and a reference store (normally InMemoryLogStore
with the same limit) in lockstep through a LogStoreScenario and
collects where they disagree. compareLogStores runs it whole; a test that
drives several stores through one scenario (two scoped stores over one
table) calls round and finish itself.
Each round writes one batch to both, applies the same removeBefore and
retainNewest when the scenario asks for them, compares the tags and reads
six random queries page by page, comparing the full result. finish
compares the change streams: the same sequence of change types with the
same entries, ids (or, without compareIds, as many ids) and times.
Without compareIds only entries are compared, for a store whose ids are
shared with other writers of its table.
Constructors
- LogStoreContractCheck({required LogStore store, required LogStore reference, required LogStoreScenario scenario, bool compareIds = true})
Properties
- compareIds → bool
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
mismatches
→ List<
LogStoreMismatch> -
Mismatches found so far; empty means the stores agreed.
no setter
- reference → LogStore
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scenario → LogStoreScenario
-
final
- store → LogStore
-
final
Methods
-
finish(
) → Future< void> - Compares the change streams once the stores have delivered them.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
round(
) → Future< void> - One round: a batch, optional removals, tags, six queries.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited