holochain / tryorama

Toolset to manage Holochain conductors and facilitate test scenarios
212 stars 14 forks source link

Feature Request: function that waits until all agents have identical dht state #167

Closed mattyg closed 1 year ago

mattyg commented 1 year ago

Currently when writing tryorama tests, we have to call sleep() after every zome call, waiting for changes to be gossiped to all agents. This makes for flaky tests that inconsistently fail if network conditions change, or slow tests that wait unecessesarily longer than needed because sleep time is static.

One way around this could be to introduce a function like waitForPeerSync(). This would compare the DHT state of all agents in the scenario and sleep until they are identical.

jost-s commented 1 year ago

I believe I can implement a simple function that will take a list of agents to check for integration, which then periodically fetches a state dump and compares integrated op count.

jost-s commented 1 year ago

@abe-njama FYI