How to reproduce unreachable for only test

Hey.

I have 2 kinds of basic questions for performance enhancement.

  1. How to check gossip message if I want to see the message?
  2. How to produce unreachable in cluster for only test?

Thanks in advance

There’s no public api for the gossip messages so no way to directly programmatically see them, but you can enable debug logging and enable debug.verbose-gossip-logging in your config and you should be able to inspect the gossip in your log file.

To test unreachability you can use the test-transport, we don’t have any reference docs for that but you can for example see it in action in the Akka test suite here: https://github.com/akka/akka/blob/master/akka-cluster-tools/src/multi-jvm/scala/akka/cluster/singleton/ClusterSingletonManagerDownedSpec.scala#L107

1 Like

Multi-jvm testkit and the blackhole feature, as Johan mentioned, is a good choice.

Another possibility is to have a custom test implementation of the failure detector. You can find inspiration for that by digging into Akka Cluster tests that are using the FailureDetectorPuppet.

1 Like

Thanks for guidance to all. I will check it