Skip to content

Commit

Permalink
improve coding style according to Elvis
Browse files Browse the repository at this point in the history
  • Loading branch information
michalwski committed Sep 29, 2016
1 parent 1e8cf1d commit 0a12e4c
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions test/ejabberd_tests/tests/bosh_interleave_reqs.erl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
-export([test/1, sample/0, prop/1]).

-export([initial_state/1, command/1, precondition/2, postcondition/3,
next_state/3]).
next_state/3]).

-export([read_config/1,
connect_carol/1,
Expand All @@ -24,7 +24,7 @@
-export([ct_config_giver/1]).

-record(state, {carol,
geralt,
geralt,
msgs_to_carol,
msgs_to_geralt,
config_pid}).
Expand All @@ -37,16 +37,16 @@ sample() ->

prop(Config) ->
Pid = spawn_link(?MODULE, ct_config_giver, [Config]),
?FORALL(Cmds, commands(?MODULE, initial_state(Pid)),
?TRAPEXIT(
begin
{History,State,Result} = run_commands(?MODULE, Cmds),
?FORALL(Cmds, commands(?MODULE, initial_state(Pid)),
?TRAPEXIT(
begin
{History, State, Result} = run_commands(?MODULE, Cmds),
maybe_stop_client(State#state.carol),
maybe_stop_client(State#state.geralt),
?WHENFAIL(ct:pal(error, "History: ~p~nState: ~p\nResult: ~p~n",
[History,State,Result]),
aggregate(command_names(Cmds), Result =:= ok))
end)).
?WHENFAIL(ct:pal(error, "History: ~p~nState: ~p\nResult: ~p~n",
[History, State, Result]),
aggregate(command_names(Cmds), Result =:= ok))
end)).

ct_config_giver(Config) ->
receive
Expand All @@ -60,8 +60,8 @@ maybe_stop_client(Client) ->
escalus_client:stop(Client).

initial_state(Pid) ->
#state{carol = undefined,
geralt = undefined,
#state{carol = undefined,
geralt = undefined,
msgs_to_carol = [],
msgs_to_geralt = [],
config_pid = Pid}.
Expand Down Expand Up @@ -115,7 +115,7 @@ read_config(Pid) ->
{ok, Config} ->
Config
after 100 ->
error
error
end.

connect_carol(Pid) ->
Expand Down

0 comments on commit 0a12e4c

Please sign in to comment.