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.
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.
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.