-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
muc_SUITE kicked_after_sending_malformed_presence test #1692
Conversation
…room before test is done.
I copied the module from another branch and now it seems as if I changed the whole module. |
Please simply force push to this branch, no need to create new PR. |
escalus:assert(is_presence_with_type, [<<"unavailable">>], PresenceUn), | ||
escalus:assert(is_stanza_from, [room_address(Room, Username)], PresenceUn), | ||
escalus:wait_for_stanza(Bob), | ||
escalus:assert(is_presence_with_type, [<<"unavailable">>], BobStanza = escalus:wait_for_stanza(Bob)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assignment inside function calls is not allowed by code standards (?).
%% GIVEN An user is in the room | ||
Room = ?config(room, Config), | ||
KateUsername = escalus_utils:get_username(Kate), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need Kate in the test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To prevent room process from terminating when Bob is kicked
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, maybe the whole test should be something like:
kicked_after_sending_malformed_presence(Config) ->
muc_helper:with_fresh_room(Config, [{alice, 1}], fun(RoomName, Alice) ->
muc_helper:join(RoomName, Alice),
muc_helper:send_malformed_presence(RoomName, Alice),
muc_helper:gets_kicked(RoomName, Alice),
muc_helper:assert_not_in_the_room(RoomName, Alice)
end).
:)
(this comment should be ignored for this PR).
kicked_after_sending_malformed_presence(Config1) -> | ||
AliceSpec = given_fresh_spec(Config1, alice), | ||
Config = given_fresh_room(Config1, AliceSpec, []), | ||
escalus:fresh_story(Config, [{bob, 1}, {kate, 1},{alice, 1}], fun(Bob, Kate, Alice) -> | ||
%% GIVEN An user is in the room |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we keep both a comment before the testcase and these small comments for each operation?
escalus:fresh_story(Config, [{bob, 1}, {kate, 1}], fun(Bob, Kate) -> | ||
%% GIVEN An user is in the room | ||
escalus:fresh_story(Config, [{bob, 1}, {kate, 1},{alice, 1}], fun(Bob, Kate, Alice) -> | ||
%GIVEN Kate in the room, to ensure that the room does not get stopped |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indention ><
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merge, but squish, replace comments.
Add info about why and how it got fixed into merge comment.
muc_SUITE kicked_after_sending_malformed_presence does not terminate room until test is done.
This PR addresses redmine 17047
17047 Description
I'm disabling this test case on master to reduce the pain with Travis builds. It has to be verified and fixed.