Starts local BEAM nodes for distributed Elixir tests.
Each cluster has its own linked controller process. Nodes are configured with
the manager's code paths, Mix environment, application environment and
selected applications. When :cover is running, new nodes are attached to it
so remotely executed code contributes to the coverage report.
Summary
Functions
Returns a supervisor child specification for a cluster.
Returns all members owned by a cluster.
Returns all distributed node names owned by a cluster.
Returns the local :peer controller PIDs owned by a cluster.
Alias for start_distribution/0.
Adds nodes to an existing cluster transactionally.
Starts Erlang distribution for the current VM.
Starts a linked cluster containing amount nodes.
Stops a cluster and all of its nodes within the default public deadline.
Stops a cluster with custom deadlines, or stops one selected member.
Stops Erlang distribution for the current VM.
Types
@type cluster() :: GenServer.server()
@type option() :: {:applications, [atom()]} | {:cluster_shutdown_timeout, pos_integer()} | {:environment, keyword()} | {:files, [Path.t()]} | {:hidden, boolean()} | {:name, GenServer.name()} | {:prefix, atom() | String.t()} | {:shutdown_timeout, pos_integer()}
Functions
@spec child_spec({pos_integer(), [option()]}) :: Supervisor.child_spec()
Returns a supervisor child specification for a cluster.
@spec members(cluster()) :: {:ok, [DevCluster.Member.t()]}
Returns all members owned by a cluster.
Returns all distributed node names owned by a cluster.
Returns the local :peer controller PIDs owned by a cluster.
@spec start() :: :ok | {:error, term()}
Alias for start_distribution/0.
@spec start(cluster(), pos_integer()) :: {:ok, [DevCluster.Member.t()]} | {:error, term()}
Adds nodes to an existing cluster transactionally.
Starts Erlang distribution for the current VM.
Calling this function again is safe. The default manager name includes the OS process ID to avoid collisions with other test VMs on the same machine.
@spec start_link(pos_integer(), [option()]) :: GenServer.on_start()
Starts a linked cluster containing amount nodes.
Stops a cluster and all of its nodes within the default public deadline.
Use stop/2 when a custom :cluster_shutdown_timeout requires a longer
public :timeout.
Stops a cluster with custom deadlines, or stops one selected member.
A keyword list accepts :timeout and :controller_timeout, both in
milliseconds. A member can instead be selected by struct, node name, or peer
PID.
@spec stop_distribution() :: :ok | {:error, term()}
Stops Erlang distribution for the current VM.