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

Problem: self tests can be improved #182

Merged
merged 1 commit into from
May 9, 2016
Merged

Conversation

opedroso
Copy link
Contributor

@opedroso opedroso commented May 9, 2016

Solution: Created three new self tests for specific API sets:

  1. mlm_stream_api
  2. mlm_service_api
  3. mlm_services_api

The difference between tests 2 and 3 is that mlm_service_api shows
how to use the service APIs with one requester, one worker, while that
mlm_services_api shows how to use the service API with two requesters
and two workers.
Also greatly increased the number of asserts in existing tests, making
sure no returned code goes without checking.
I believe that to be important in self tests.

Hopefully I correctly followed the unwritten rules of formatting required
such as space before the parenthesis in function calls and no camel case
of variable names. By the way, I even fixed this for some existing code.

If any of this code should be generated, I was not able to find the source,
so I modified the .h/.c files directly. Sorry if this is a mistake.
If so, please let me know what are the xml/gsl files that I should have
applied my changes instead and I will modify them.

The plan is to write another test to focus on the mailbox API only.

Solution: Created three new self tests for specific API sets:
1) mlm_stream_api
2) mlm_service_api
3) mlm_services_api

The difference between tests 2 and 3 is that mlm_service_api shows
how to use the service APIs with one requester, one worker, while that
mlm_services_api shows how to use the service API with two requesters
and two workers.
Also greatly increased the number of asserts in existing tests, making
sure no returned code goes without checking.
I believe that to be important in self tests.

Hopefully I correctly followed the unwritten rules of formatting required
such as space before the parenthesis in function calls and no camel case
of variable names. By the way, I even fixed this for some existing code.

If any of this code should be generated, I was not able to find the source,
so I modified the .h/.c files directly. Sorry if this is a mistake.
If so, please let me know what are the xml/gsl files that I should have
applied my changes instead and I will modify them.

The plan is to write another test to focus on the mailbox API only.
@hintjens hintjens merged commit 9a3fa44 into zeromq:master May 9, 2016
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.

2 participants