Skip to content
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

Refactor ejabberd_c2s:wait_for_stream/2 #495

Merged
merged 10 commits into from
Aug 28, 2015

Conversation

erszcz
Copy link
Member

@erszcz erszcz commented Aug 27, 2015

Local tests and coverage reports show almost complete coverage of the refactored FSM state. Testing against the version just before refactoring shows similar coverage and the same tests pass without modification.

I couldn't come up with a test case which would fall into wait_for_stream({xmlstreamelement, _}, ...) clause - if the first element sent on a newly opened socket is not <stream:stream> it still gets passed to the function wrapped as {xmlstreamstart, _, _}, not {xmlstreamelement, _}. See https://github.com/esl/ejabberd_tests/tree/element-before-stream-start for a tried but finally dropped approach. It's probably something lower (even lower than ejabberd_receiver, probably XML parser in xml).

Ready to merge once Travis passes.

@mongoose-im
Copy link
Collaborator

travis is using test branch refactor-c2s-wait-for-stream from https://github.com/esl/ejabberd_tests/tree/refactor-c2s-wait-for-stream

@michalwski
Copy link
Contributor

Please create a corresponding PR for ejabberd_tests.

michalwski added a commit that referenced this pull request Aug 28, 2015
Refactor ejabberd_c2s:wait_for_stream/2
@michalwski michalwski merged commit 9eeb17b into master Aug 28, 2015
@erszcz erszcz deleted the refactor-c2s-wait-for-stream branch August 28, 2015 09:28
@michalwski michalwski mentioned this pull request Oct 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants