Skip to content

Commit d5f5a74

Browse files
seriypsCopilot
andcommitted
fix: start epmd before net_kernel in split_dc_SUITE; ci: epmd -daemon
split_dc_SUITE requires Erlang distribution (peer module). On GitHub Actions (and any fresh environment) epmd is not pre-started, causing net_kernel:start to fail with nodistribution. Fix: call os:cmd("epmd -daemon") before net_kernel:start in init_per_suite. The call is idempotent — safe when epmd is already running. Also start epmd explicitly in the CI 'ct' step as a belt-and-suspenders measure. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 121d8b7 commit d5f5a74

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
run: rebar3 eunit
4646

4747
- name: ct
48-
run: rebar3 ct
48+
run: epmd -daemon && rebar3 ct
4949

5050
- name: dialyzer
5151
run: rebar3 dialyzer

test/split_dc_SUITE.erl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ init_per_suite(Cfg) ->
3838
{ok, _} = application:ensure_all_started(inets),
3939
{ok, _} = application:ensure_all_started(ranch),
4040
%% peer:start_link requires the current node to be distributed.
41-
%% Start distribution if rebar3 ct didn't already do so.
41+
%% Start EPMD daemon first (no-op if already running), then enable
42+
%% distribution if rebar3 ct didn't already do so.
43+
os:cmd("epmd -daemon"),
4244
Distributed =
4345
case net_kernel:start([split_dc_test, shortnames]) of
4446
{ok, _} -> true;

0 commit comments

Comments
 (0)