# How to reproduce unreachable for only test

**URL:** <https://discuss.akka.io/t/how-to-reproduce-unreachable-for-only-test/5552>\
**Category:** Akka Libraries\
**Created:** [December 6, 2019, 7:33am UTC](https://discuss.akka.io/t/how-to-reproduce-unreachable-for-only-test/5552 "2019-12-06T07:33:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![john](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@john](https://discuss.akka.io/u/john)\
**Post date:** [December 6, 2019, 7:33am UTC](https://discuss.akka.io/t/how-to-reproduce-unreachable-for-only-test/5552/1 "2019-12-06T07:33:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![johanandren](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/johanandren/32/85_2.png) [@johanandren](https://discuss.akka.io/u/johanandren)\
**Post date:** [December 6, 2019, 4:09pm UTC](https://discuss.akka.io/t/how-to-reproduce-unreachable-for-only-test/5552/2 "2019-12-06T16:09:16Z")

</div>

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](https://github.com/akka/akka/blob/master/akka-cluster-tools/src/multi-jvm/scala/akka/cluster/singleton/ClusterSingletonManagerDownedSpec.scala#L107)

---

<div class="post-metadata">

**Author:** ![patriknw](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/patriknw/32/89_2.png) [@patriknw](https://discuss.akka.io/u/patriknw)\
**Post date:** [December 7, 2019, 8:30am UTC](https://discuss.akka.io/t/how-to-reproduce-unreachable-for-only-test/5552/3 "2019-12-07T08:30:26Z")

</div>

[Multi-jvm testkit](https://doc.akka.io/docs/akka/current/multi-jvm-testing.html) 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](https://github.com/akka/akka/blob/master/akka-cluster/src/test/scala/akka/cluster/FailureDetectorPuppet.scala).

---

<div class="post-metadata">

**Author:** ![john](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@john](https://discuss.akka.io/u/john)\
**Post date:** [December 10, 2019, 5:12am UTC](https://discuss.akka.io/t/how-to-reproduce-unreachable-for-only-test/5552/4 "2019-12-10T05:12:04Z")

</div>

Thanks for guidance to all. I will check it
