Skip to content

Release v15.35.8

Choose a tag to compare

@github-actions github-actions released this 28 Jun 10:18
abb04fe

Summary

ReadModelScenario, the in-process read model testing harness, diverged from the real Chronicle runtime in a few ways that could let read model specs pass while the modeled behavior was actually wrong — and could hide reducer bugs entirely. These fixes bring it in line with runtime behavior for read model removal, reducer initial state, reducer failures, and event sequence numbers.

Fixed

  • ReadModelScenario now reflects a root-level removal: a class-level [RemovedWith] (and [ClearWith] on a [Nested]) makes Instance resolve to null instead of returning the stale pre-removal state.
  • ReadModelScenario now seeds reducer-backed read models with the provided initial state instead of always starting the reducer from null.
  • ReadModelScenario now surfaces a failing reducer (throwing ReducerFailed) instead of returning the reducer's partial state as a successful result.
  • ReadModelScenario now assigns increasing per-event sequence numbers to a reducer's EventContext instead of the first sequence number for every event.