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

C2s testing -- first step #364

Merged
merged 3 commits into from
Feb 4, 2015
Merged

C2s testing -- first step #364

merged 3 commits into from
Feb 4, 2015

Conversation

pzel
Copy link
Contributor

@pzel pzel commented Jan 27, 2015

This is an initial pull request aimed at easing ejabberd_c2s refactoring.
Three things have been achieved:

  1. Create separate test suite (apps/ejabberd2/tests/ejabberd_c2s_SUITE.erl).
  2. Move c2s-related defines and record declarations to src/ejabberd.hrl. This is an internal include and still needs work, but it's a first step towards better organization.
  3. Extract all c2s dependencies and launch them in ejabberd_c2s_SUITE_mocks:[setup/0, teardown/0]

stream_mgmt_resume_tref,
stream_mgmt_constraint_check_tref
}).
-type aux_key() :: atom().
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think putting types in .hrl files is a good idea due to possible name clashes. Namespacing options in Erlang are limited, but let's use them when possible ;)

@pzel
Copy link
Contributor Author

pzel commented Jan 27, 2015

Your sensible reservation was pre-empted in the commit message:

  1. Move c2s-related defines and record declarations to src/ejabberd.hrl. This is an internal include and still needs work, but it's a first step towards better organization.

The types & various other concerns will definitely be separated, but I don't want to fall in the trap of kitchen-sink pull requests.

@erszcz
Copy link
Member

erszcz commented Jan 27, 2015

Just sayin' :)

@@ -3100,208 +2973,3 @@ defer_resource_constraint_check(#state{stream_mgmt_constraint_check_tref = undef
State#state{stream_mgmt_constraint_check_tref = TRef};
defer_resource_constraint_check(State)->
State.

-ifdef(TEST).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remember to resurrect this tests in next steps.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Certainly!

michalwski added a commit that referenced this pull request Feb 4, 2015
C2s testing -- first step
@michalwski michalwski merged commit 4ecc8cd into master Feb 4, 2015
@michalwski michalwski deleted the c2s_testing branch February 13, 2015 14:32
This was referenced Apr 2, 2015
@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