diff options
author | Hans Bolinder <[email protected]> | 2016-02-22 13:24:42 +0100 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2016-02-22 13:24:42 +0100 |
commit | b8cd565e69ee2affbfeee3a9d924265b9222edb9 (patch) | |
tree | 404043a232715984296b5550ff8620d15924a910 /lib/common_test/src/test_server_node.erl | |
parent | 2c370def9ddbc34efb16f5dbe8064350c140183a (diff) | |
parent | 8c5f8128fc167d67fbd5d63205f35eade4cc741f (diff) | |
download | otp-b8cd565e69ee2affbfeee3a9d924265b9222edb9.tar.gz otp-b8cd565e69ee2affbfeee3a9d924265b9222edb9.tar.bz2 otp-b8cd565e69ee2affbfeee3a9d924265b9222edb9.zip |
Merge branch 'maint'
* maint:
Fix a few dialyzer warnings
Diffstat (limited to 'lib/common_test/src/test_server_node.erl')
-rw-r--r-- | lib/common_test/src/test_server_node.erl | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/lib/common_test/src/test_server_node.erl b/lib/common_test/src/test_server_node.erl index db8d3cde01..c12832e0d0 100644 --- a/lib/common_test/src/test_server_node.erl +++ b/lib/common_test/src/test_server_node.erl @@ -354,15 +354,18 @@ start_node_peer(SlaveName, OptList, From, TI) -> I = "=== Not waiting for node", gen_server:reply(From,{{ok, Nodename}, HostStr, Cmd, I, []}), Self = self(), - spawn_link( - fun() -> - wait_for_node_started(LSock,Tmo,undefined, - Cleanup,TI,Self), - receive after infinity -> ok end - end), + spawn_link(wait_for_node_started_fun(LSock,Tmo,Cleanup,TI,Self)), ok end. +-spec wait_for_node_started_fun(_, _, _, _, _) -> fun(() -> no_return()). +wait_for_node_started_fun(LSock, Tmo, Cleanup, TI, Self) -> + fun() -> + wait_for_node_started(LSock,Tmo,undefined, + Cleanup,TI,Self), + receive after infinity -> ok end + end. + %% %% Slave nodes are started on a remote host if %% - the option remote is given when calling test_server:start_node/3 @@ -468,7 +471,11 @@ handle_start_node_return(Version,VsnStr,{started, Node, OVersion, OVsnStr}) -> node_started([Host,PortAtom]) -> %% Must spawn a new process because the boot process should not %% hang forever!! - spawn(fun() -> node_started(Host,PortAtom) end). + spawn(node_started_fun(Host,PortAtom)). + +-spec node_started_fun(_, _) -> fun(() -> no_return()). +node_started_fun(Host,PortAtom) -> + fun() -> node_started(Host,PortAtom) end. %% This process hangs forever, just waiting for the socket to be %% closed and terminating the node |