File 3803-ssh-Remove-is_port-1-from-tests.patch of Package erlang

From 09c604bc36e58596b7613273f3c3de2bab6785f4 Mon Sep 17 00:00:00 2001
From: Hans Nilsson <hans@erlang.org>
Date: Mon, 29 Jun 2020 11:57:25 +0200
Subject: [PATCH 3/4] ssh: Remove is_port/1 from tests

---
 lib/ssh/test/ssh_test_lib.erl | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/lib/ssh/test/ssh_test_lib.erl b/lib/ssh/test/ssh_test_lib.erl
index a9591547dd..9956fb6421 100644
--- a/lib/ssh/test/ssh_test_lib.erl
+++ b/lib/ssh/test/ssh_test_lib.erl
@@ -297,17 +297,17 @@ start_shell(Port, IOServer, ExtraOptions) ->
                           ct:log("is_integer(Port) Call ssh:shell(~p, ~p, ~p)",
                                  [Host, Port, Options]),
                           ssh:shell(Host, Port, Options);
-                      Socket when is_port(Socket) ->
+                      ConnRef when is_pid(ConnRef) ->
+                          ct:log("is_pid(ConnRef) Call ssh:shell(~p)",
+                                 [ConnRef]),
+                          ssh:shell(ConnRef); % Options were given in ssh:connect
+                      Socket ->
                           receive
                               start -> ok
                           end,
-                          ct:log("is_port(Socket) Call ssh:shell(~p, ~p)",
+                          ct:log("Socket Call ssh:shell(~p, ~p)",
                                  [Socket, Options]),
-                          ssh:shell(Socket, Options);
-                      ConnRef when is_pid(ConnRef) ->
-                          ct:log("is_pid(ConnRef) Call ssh:shell(~p)",
-                                 [ConnRef]),
-                          ssh:shell(ConnRef) % Options were given in ssh:connect
+                          ssh:shell(Socket, Options)
                   end
               of
                   R ->
-- 
2.26.2

openSUSE Build Service is sponsored by