We generate timestamps/high-res timestamps in several places. These values end up in graph views and ecosystem dehydrations which is annoying for snapshot testing especially. Make all these calls go through a single method - IdGenerator#now. Now you only have to override the IdGenerator class's generateId and now methods to create fully-reproducible ids.
We may expand this someday to use functions or an IdGenerator-extending class that you pass to createEcosystem. Bu monkey-patching in test envs is good enough for now.
Description
We generate timestamps/high-res timestamps in several places. These values end up in graph views and ecosystem dehydrations which is annoying for snapshot testing especially. Make all these calls go through a single method -
IdGenerator#now
. Now you only have to override the IdGenerator class'sgenerateId
andnow
methods to create fully-reproducible ids.We may expand this someday to use functions or an IdGenerator-extending class that you pass to
createEcosystem
. Bu monkey-patching in test envs is good enough for now.