jepsen-io / jepsen

A framework for distributed systems verification, with fault injection
6.81k stars 719 forks source link

how to test final consistency like gossip? #264

Closed hurkgu closed 5 years ago

hurkgu commented 6 years ago

how to sleep a heartbeat cycle time while running with multi thread, so i can get data that all node had update?

mkcp commented 6 years ago

If you're looking to ensure a cluster has time at the end of the test before making final reads, the hazelcast tests use a concept called a final generator, executed after waiting for the cluster to heal. https://github.com/jepsen-io/jepsen/blob/master/hazelcast/src/jepsen/hazelcast.clj#L414

But if you want to execute operations against the system slower, you can use jepsen.generator/sleep to delay generated ops. This would lower overall throughput of the test, though making subtle errors harder to find.

Hope this helps!