whitfin / local-cluster

Easy local cluster creation for Elixir to aid in unit testing
MIT License
226 stars 30 forks source link

Starting local cluster with the main node as a hidden node? #6

Open keathley opened 5 years ago

keathley commented 5 years ago

The title here is probably more of a potential solution then the underlying problem.

In a lot of my tests I need to ensure that nodes discover and connect to each other. But when local cluster the primary node connects to the other nodes and creates a full mesh between all of the existing nodes. I'm not even sure if what I want to do is possible but I'm wondering if there's a programatic way to start the main node as a hidden node or something similar so that the cluster behaves as though the main node isn't truly a part of the cluster. I know that you can pass an erl flag to set a node as hidden but I'm not sure if you can do that once the node is already booted.

I might be going in a totally wrong direction here (and if so please tell me so) but I wanted to get your thoughts on it.

whitfin commented 5 years ago

@keathley if you can figure out a way to make this work, I have no issue with it :) I actually wanted to do that initially, but didn't have the time to sink into it