mirror of
https://github.com/seriyps/mtproto_proxy.git
synced 2026-05-13 08:46:46 +00:00
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>
This commit is contained in:
parent
121d8b7413
commit
d5f5a74de5
2 changed files with 4 additions and 2 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
|
@ -45,7 +45,7 @@ jobs:
|
|||
run: rebar3 eunit
|
||||
|
||||
- name: ct
|
||||
run: rebar3 ct
|
||||
run: epmd -daemon && rebar3 ct
|
||||
|
||||
- name: dialyzer
|
||||
run: rebar3 dialyzer
|
||||
|
|
|
|||
|
|
@ -38,7 +38,9 @@ init_per_suite(Cfg) ->
|
|||
{ok, _} = application:ensure_all_started(inets),
|
||||
{ok, _} = application:ensure_all_started(ranch),
|
||||
%% peer:start_link requires the current node to be distributed.
|
||||
%% Start distribution if rebar3 ct didn't already do so.
|
||||
%% Start EPMD daemon first (no-op if already running), then enable
|
||||
%% distribution if rebar3 ct didn't already do so.
|
||||
os:cmd("epmd -daemon"),
|
||||
Distributed =
|
||||
case net_kernel:start([split_dc_test, shortnames]) of
|
||||
{ok, _} -> true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue