Skip to content

Commit

Permalink
Remove wait_for_c2s_state
Browse files Browse the repository at this point in the history
  • Loading branch information
arcusfelis committed Dec 14, 2021
1 parent 00d4153 commit 2705b1a
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions big_tests/tests/sm_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1042,9 +1042,9 @@ messages_are_properly_flushed_during_resumption(Config) ->
SMH = escalus_connection:get_sm_h(Alice),
escalus_client:kill_connection(Config, Alice),
%% The receiver process would stop now
wait_for_c2s_state(Alice, resume_session),

C2SPid = mongoose_helper:get_session_pid(Alice),
wait_for_c2s_state_change(C2SPid, resume_session),

wait_for_queue_length(C2SPid, 0),
ok = rpc(mim(), sys, suspend, [C2SPid]),

Expand Down Expand Up @@ -1081,8 +1081,8 @@ messages_are_properly_flushed_during_resumption_p1_fsm_old(Config) ->
Alice = connect_fresh(Config, alice, sr_presence),
SMH = escalus_connection:get_sm_h(Alice),
escalus_client:kill_connection(Config, Alice),
wait_for_c2s_state(Alice, resume_session),
C2SPid = mongoose_helper:get_session_pid(Alice),
wait_for_c2s_state_change(C2SPid, resume_session),
ok = rpc(mim(), sys, suspend, [C2SPid]),

%% send some dummy event. ignored by c2s but ensures that
Expand Down Expand Up @@ -1358,10 +1358,6 @@ stop_client_and_wait_for_termination(Alice) ->
escalus_connection:stop(Alice),
ok = wait_for_process_termination(C2SRef).

wait_for_c2s_state(Alice, StateName) ->
C2SPid = mongoose_helper:get_session_pid(Alice),
mongoose_helper:wait_until(fun() -> get_c2s_state(C2SPid) end, StateName).

kill_and_connect_with_resume_session_without_waiting_for_result(Alice) ->
SMH = escalus_connection:get_sm_h(Alice),
AliceSpec = client_to_spec(Alice),
Expand Down

0 comments on commit 2705b1a

Please sign in to comment.