Skip to content

Release v22.69.0

Choose a tag to compare

@github-actions github-actions released this 11 Oct 16:40
e17a13b

Summary

QueryScenario can now exercise observable queries, so a specification can assert both the first result of a query that returns ISubject<T> and the updates it pushes afterwards.

Added

  • QueryScenario.Observe(...) subscribes to an observable or IAsyncEnumerable<T> query and returns a QueryObservation. Initial is the first result, and Next(timeout) waits for the next one. Results are buffered from the moment of subscription, so a specification never has to sleep, and each result goes through read-model interceptors and emission guards the same way it does over SSE and WebSocket. (#3153)
  • Documentation for observable queries in QueryScenario, including the limits: a result from Next is the next emission, not the next distinct value, and MongoDB .Observe() queries need a real database. (#3153)

Changed

  • QueryScenario.Perform returns the first result of a query that returns ISubject<T> or ISubject<IEnumerable<T>>, the same result a plain HTTP request gets, instead of throwing StreamingQueryNotSupported. (#3153)
  • Disposing a QueryScenario also ends its observations, after any startup and in-flight processing have settled. QueryObservation.Dispose() starts disposal without waiting; use DisposeAsync() or dispose the scenario to wait for cleanup. (#3153)