Looking for good examples of Projects that have tests that cover distributed behaviour

To write a test suite for my [virtual actor framework] will require starting, or simulating multiple nodes.
i.e. I am trying to write a test that asserts an actor can only be running on one node at a time.

Is it possible to have multiple nodes running a single test suite. are there any good examples of projects that do this?

Firenest would probably be a prime example of doing that.


Maybe https://github.com/lasp-lang/partisan/tree/master/test or https://github.com/SpaceTime-IoT/erleans/tree/master/test.

1 Like

Thanks for this. I have tried to follow the setup as in firenest but can’t work out to start Elixir on the other node.
My test setup is as follows.

|> IO.inspect()

{:ok, ipv4} = :inet.parse_ipv4_address('')

{:ok, peer_1} =
  :slave.start_link('', :peer_1, inet_loader_args())
  |> IO.inspect()

|> IO.inspect()

Node.spawn(peer_1, Node, :list, [])
|> IO.inspect()

However this results in the following error

16:41:06.338 [error] Error in process #PID<17485.44.0> on node :"peer_1@" with exit value:
{:undef, [{Node, :list, [], []}]}

I think this is the relevant part from Firenest:

1 Like

Thanks this is helpful. I wonder if there is any reusable pattern here to wrap up all the steps involved in transferring code_paths/config etc