ct_rpc

Common Test specific layer on Erlang/OTP rpc.

Common Test specific layer on Erlang/OTP rpc.

Functions


app_node(App, Candidates) -> NodeName

  • App = atom()
  • Candidates = [NodeName]
  • NodeName = atom()

From a set of candidate nodes determines which of them is running the application App. If none of the candidate nodes is running the application the function will make the test case calling this function fail. This function is the same as calling app_node(App, Candidates, true).

app_node(App, Candidates, FailOnBadRPC) -> NodeName

  • App = atom()
  • Candidates = [NodeName]
  • NodeName = atom()
  • FailOnBadRPC = true | false

Same as app_node/2 only the FailOnBadRPC argument will determine if the search for a candidate node should stop or not if badrpc is received at some point.

app_node(App, Candidates, FailOnBadRPC, Cookie) -> NodeName

  • App = atom()
  • Candidates = [NodeName]
  • NodeName = atom()
  • FailOnBadRPC = true | false
  • Cookie = atom()

Same as app_node/2 only the FailOnBadRPC argument will determine if the search for a candidate node should stop or not if badrpc is received at some point. The cookie on the client node will be set to Cookie for this rpc operation (use to match the server node cookie).

call(Node, Module, Function, Args) -> term() | {badrpc, Reason}

Same as call(Node, Module, Function, Args, infinity)

call(Node, Module, Function, Args, TimeOut) -> term() | {badrpc, Reason}

  • Node = NodeName | {Fun, FunArgs}
  • Fun = function()
  • FunArgs = term()
  • NodeName = atom()
  • Module = atom()
  • Function = atom()
  • Args = [term()]
  • Reason = timeout | term()

Evaluates apply(Module, Function, Args) on the node Node. Returns whatever Function returns or {badrpc, Reason} if the remote procedure call fails. If Node is {Fun, FunArgs} applying Fun to FunArgs should return a node name.

call(Node, Module, Function, Args, TimeOut, Cookie) -> term() | {badrpc, Reason}

  • Node = NodeName | {Fun, FunArgs}
  • Fun = function()
  • FunArgs = term()
  • NodeName = atom()
  • Module = atom()
  • Function = atom()
  • Args = [term()]
  • Reason = timeout | term()
  • Cookie = atom()

Evaluates apply(Module, Function, Args) on the node Node. Returns whatever Function returns or {badrpc, Reason} if the remote procedure call fails. If Node is {Fun, FunArgs} applying Fun to FunArgs should return a node name. The cookie on the client node will be set to Cookie for this rpc operation (use to match the server node cookie).

cast(Node, Module, Function, Args) -> ok

  • Node = NodeName | {Fun, FunArgs}
  • Fun = function()
  • FunArgs = term()
  • NodeName = atom()
  • Module = atom()
  • Function = atom()
  • Args = [term()]
  • Reason = timeout | term()

Evaluates apply(Module, Function, Args) on the node Node. No response is delivered and the process which makes the call is not suspended until the evaluation is compleated as in the case of call/[3,4]. If Node is {Fun, FunArgs} applying Fun to FunArgs should return a node name.

cast(Node, Module, Function, Args, Cookie) -> ok

  • Node = NodeName | {Fun, FunArgs}
  • Fun = function()
  • FunArgs = term()
  • NodeName = atom()
  • Module = atom()
  • Function = atom()
  • Args = [term()]
  • Reason = timeout | term()
  • Cookie = atom()

Evaluates apply(Module, Function, Args) on the node Node. No response is delivered and the process which makes the call is not suspended until the evaluation is compleated as in the case of call/[3,4]. If Node is {Fun, FunArgs} applying Fun to FunArgs should return a node name. The cookie on the client node will be set to Cookie for this rpc operation (use to match the server node cookie).