-
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
Fix optargs issue #2105
base: master
Are you sure you want to change the base?
Fix optargs issue #2105
Conversation
5759.1 / Erlang 19.3 / small_tests / 1a0c953 5759.3 / Erlang 19.3 / mysql_redis / 1a0c953 5759.5 / Erlang 19.3 / ldap_mnesia / 1a0c953 5759.6 / Erlang 19.3 / elasticsearch_and_cassandra_mnesia / 1a0c953 5759.2 / Erlang 19.3 / internal_mnesia / 1a0c953 mod_global_distrib_SUITE:mod_global_distrib:test_pm_with_ungraceful_reconnection_to_different_server{error,
{timeout_when_waiting_for_stanza,
[{escalus_client,wait_for_stanza,
[{client,<<"eve40.10468@localhost/res1">>,escalus_tcp,
<0.13023.1>,
[{event_manager,<0.13014.1>},
{server,<<"localhost">>},
{username,<<"eve40.10468">>},
{resource,<<"res1">>}],
[{event_client,
[{event_manager,<0.13014.1>},
{server,<<"localhost">>},
{username,<<"eve40.10468">>},
{resource,<<"res1">>}]},
{resource,<<"res1">>},
{username,<<"eve40.10468">>},
{server,<<"localhost">>},
{host,<<"localhost">>},
{port,5222},
{auth,{escalus_auth,auth_plain}},
{wspath,undefined},
{username,<<"eve40.10468">>},
{server,<<"localhost">>},
{password,<<"password">>},
{port,5222},
{stream_management,true},
{stream_id,<<"C4CC70ACD9D8820F">>}]},
10000],
[{file,
"/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
{line,138}]},
{mod_global_distrib_SUITE,
'-test_pm_with_ungraceful_reconnection_to_different_server/1-fun-0-',
4,
[{file,"mod_global_distrib_SUITE.erl"},{line,603}]},
{escalus_story,story,4,
[{file,
"/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,72}]},
{tes... 5759.4 / Erlang 19.3 / odbc_mssql_mnesia / 1a0c953 mod_global_distrib_SUITE:mod_global_distrib:test_components_in_different_regions{error,
{timeout_when_waiting_for_stanza,
[{escalus_client,wait_for_stanza,
[{client,undefined,escalus_tcp,<0.17803.3>,undefined,
[{sid,<<"8B2ADE25E420F56D">>},
{port,9990},
{component,<<"service2">>},
{host,<<"localhost">>},
{password,<<"secret">>},
{server,<<"localhost">>},
{component,<<"test_service">>}]},
5000],
[{file,
"/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
{line,138}]},
{mod_global_distrib_SUITE,test_components_in_different_regions,1,
[{file,"mod_global_distrib_SUITE.erl"},{line,472}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1529}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1045}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,977}]}]}} 5759.8 / Erlang 20.0 / pgsql_mnesia / 1a0c953 5759.9 / Erlang 21.0 / riak_mnesia / 1a0c953 |
Codecov Report
@@ Coverage Diff @@
## master #2105 +/- ##
==========================================
+ Coverage 75.29% 75.35% +0.05%
==========================================
Files 320 320
Lines 28589 28589
==========================================
+ Hits 21527 21542 +15
+ Misses 7062 7047 -15
Continue to review full report at Codecov.
|
I don't think this solves all cases. It has to handle the situation where some/all of the I think you need some sort of argument that fills in the missing values, similar to here before checking the arity. |
@varnerac, of course you're right :) We also need tests in this PR that would test this untested till now code branch. |
6 similar comments
@varnerac, of course you're right :) We also need tests in this PR that would test this untested till now code branch. |
@varnerac, of course you're right :) We also need tests in this PR that would test this untested till now code branch. |
@varnerac, of course you're right :) We also need tests in this PR that would test this untested till now code branch. |
@varnerac, of course you're right :) We also need tests in this PR that would test this untested till now code branch. |
@varnerac, of course you're right :) We also need tests in this PR that would test this untested till now code branch. |
@varnerac, of course you're right :) We also need tests in this PR that would test this untested till now code branch. |
@varnerac, of course you're right :) We also need tests in this PR that would test this untested till now code branch. Thanks for the comment |
3 similar comments
@varnerac, of course you're right :) We also need tests in this PR that would test this untested till now code branch. Thanks for the comment |
@varnerac, of course you're right :) We also need tests in this PR that would test this untested till now code branch. Thanks for the comment |
@varnerac, of course you're right :) We also need tests in this PR that would test this untested till now code branch. Thanks for the comment |
Sorry for comment spam. GitHub went sideways last night. |
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.
This issue requires better solution, i.e. automatic application of default values. What is more, as far as I can see, QVals
and B
are ignored? Or are they extracted later from Req
?
When you tried to define a command for action different than read/GET MIM would not take optional arguments into consideration.
It was because we checked actual number of arguments against
command arity
instead offunction arity
(which is not the same!!!).This PR is going to fix this problem.
This did not show up earlier because we used opt argsonly with read actions.