File 0411-Remove-use-of-slave-in-diameter-tests.patch of Package erlang

From 0293b5988d3fd489a0aad8a01febc658653811fa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20W=C4=85sowski?= <michal@erlang.org>
Date: Wed, 30 Apr 2025 09:55:16 +0200
Subject: [PATCH] Remove use of slave in diameter tests

---
 lib/diameter/test/diameter_dist_SUITE.erl         |  8 ++++----
 lib/diameter/test/diameter_distribution_SUITE.erl |  6 +++---
 lib/diameter/test/diameter_examples_SUITE.erl     | 12 ++++++------
 3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/lib/diameter/test/diameter_dist_SUITE.erl b/lib/diameter/test/diameter_dist_SUITE.erl
index 5dc3945be4..5556b419c3 100644
--- a/lib/diameter/test/diameter_dist_SUITE.erl
+++ b/lib/diameter/test/diameter_dist_SUITE.erl
@@ -148,7 +148,7 @@ do_traffic(Factor) ->
     ?DL("do_traffic -> check we have distribution"),
     true = is_alive(),  %% need distribution for peer nodes
     ?DL("do_traffic -> get nodes"),
-    Nodes = enslave(),
+    Nodes = get_nodes(),
     ?DL("do_traffic -> ping nodes (except client node)"),
     [] = ping(lists:droplast(Nodes)),  %% drop client node
     ?DL("do_traffic -> start nodes"),
@@ -160,12 +160,12 @@ do_traffic(Factor) ->
     ?DL("do_traffic -> done"),
     ok.
 
-%% enslave/1
+%% get_nodes/0
 %%
-%% Start four slave nodes, three to implement a Diameter server,
+%% Start four peer nodes, three to implement a Diameter server,
 %% one to implement a client.
 
-enslave() ->
+get_nodes() ->
     Here = filename:dirname(code:which(?MODULE)),
     Ebin = filename:join([Here, "..", "ebin"]),
     Args = ["-pa", Here, Ebin],
diff --git a/lib/diameter/test/diameter_distribution_SUITE.erl b/lib/diameter/test/diameter_distribution_SUITE.erl
index e05d514ea5..d48a1e587b 100644
--- a/lib/diameter/test/diameter_distribution_SUITE.erl
+++ b/lib/diameter/test/diameter_distribution_SUITE.erl
@@ -149,7 +149,7 @@ do_traffic(Factor) ->
     ?DL("do_traffic -> make sure we have distro"),
     true = is_alive(),  %% need distribution for peer nodes
     ?DL("do_traffic -> get nodes"),
-    Nodes = enslave(),
+    Nodes = get_nodes(),
     ?DL("do_traffic -> ping nodes"),
     [] = ping(Nodes),  %% drop client node
     ?DL("do_traffic -> start nodes"),
@@ -163,13 +163,13 @@ do_traffic(Factor) ->
     ?DL("do_traffic -> done"),
     ok.
 
-%% enslave/0
+%% get_nodes/0
 %%
 %% Start four nodes;
 %%   - one to implement a Diameter server,
 %%   - three to implement a client.
 
-enslave() ->
+get_nodes() ->
     Here = filename:dirname(code:which(?MODULE)),
     Ebin = filename:join([Here, "..", "ebin"]),
     Args = ["-pa", Here, Ebin],
diff --git a/lib/diameter/test/diameter_examples_SUITE.erl b/lib/diameter/test/diameter_examples_SUITE.erl
index cefe026cb9..42ccb36f09 100644
--- a/lib/diameter/test/diameter_examples_SUITE.erl
+++ b/lib/diameter/test/diameter_examples_SUITE.erl
@@ -306,7 +306,7 @@ make_name(Dict) ->
 %% Compile example code under examples/code.
 
 compile_code(Tmpdir) ->
-    {ok, Pid, Node} = slave(peer:random_name(), here()),
+    {ok, Pid, Node} = peer(peer:random_name(), here()),
     try
         {ok, _Ebin} = rpc:call(Node, ?MODULE, install, [Tmpdir])
     after
@@ -373,17 +373,17 @@ store(Path, Dict) ->
 
 %% ===========================================================================
 
-%% enslave/1
+%% get_nodes/1
 %%
 %% Start two nodes: one for the server, one for the client.
 
-enslave(Prefix) ->
+get_nodes(Prefix) ->
     [{S,N} || D <- [here()],
               S <- ?NODES,
               M <- [lists:append(["diameter", Prefix, ?L(S)])],
-              {ok, _, N} <- [slave(M,D)]].
+              {ok, _, N} <- [peer(M,D)]].
 
-slave(Name, Dir) ->
+peer(Name, Dir) ->
     Args = ["-pa", Dir, filename:join([Dir, "..", "ebin"])],
     {ok, _Pid, _Node} = ?PEER(#{name => Name, args => Args}).
 
@@ -438,7 +438,7 @@ traffic(client) ->
     receive {'DOWN', MRef, process, _, Reason} -> Reason end;
 
 traffic({Prot, Ebin}) ->
-    Nodes = enslave(?L(Prot)),
+    Nodes = get_nodes(?L(Prot)),
     [] = start([Prot, Ebin | Nodes]),
     [] = [RC || {T,N} <- Nodes,
                 RC <- [rpc:call(N, ?MODULE, traffic, [T])],
-- 
2.43.0

openSUSE Build Service is sponsored by