The headliner is DriverStateVerifier. This component observes the events sent to / received from a BoskDriver and ensures that the outgoing events are consistent with the incoming ones. AbstractDriverTest (which includes DriverConformanceTest) now wraps the tested driver in a DriverStateVerifier to make sure it's propagating events correctly.
This turned out to be difficult when multiple threads are involved. Drivers are permitted to make certain changes to the event stream (as long as they have the same effect on the bosk state), and this, combined with figuring out the right interleaving of events from multiple threads based solely on the effect they had, turned out to be difficult.
I'm planning to take a break from this and implement a context propagation system, which I want anyway, and which will allow me to determine the source thread for each event, greatly simplifying the verification process.
Additional changes
Fixed Reference comparison so a Reference and CatalogReference to the same node will compare equal; similar for Listing and SideTable references
Fixed Sequoia to remove the _id field from manifest document change stream event before processing it, thus silencing a warning about it being unexpected and ignored
Fixed a couple of vestigial dependencies on Entity which should be StateTreeNode
Main change
The headliner is
DriverStateVerifier
. This component observes the events sent to / received from aBoskDriver
and ensures that the outgoing events are consistent with the incoming ones.AbstractDriverTest
(which includesDriverConformanceTest
) now wraps the tested driver in aDriverStateVerifier
to make sure it's propagating events correctly.This turned out to be difficult when multiple threads are involved. Drivers are permitted to make certain changes to the event stream (as long as they have the same effect on the bosk state), and this, combined with figuring out the right interleaving of events from multiple threads based solely on the effect they had, turned out to be difficult.
I'm planning to take a break from this and implement a context propagation system, which I want anyway, and which will allow me to determine the source thread for each event, greatly simplifying the verification process.
Additional changes
Reference
comparison so aReference
andCatalogReference
to the same node will compare equal; similar forListing
andSideTable
references_id
field from manifest document change stream event before processing it, thus silencing a warning about it being unexpected and ignoredEntity
which should beStateTreeNode
DriverConformanceTest.replaceNonexistentField
ReportingDriver
, which emits "event objects" for each driver operation