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

Added more unit tests for offset and zookeeper. #445

Merged
merged 1 commit into from Aug 16, 2016

Conversation

lightswitch05
Copy link
Contributor

@lightswitch05 lightswitch05 commented Aug 15, 2016

Added more tests involving offset and zookeeper.

Coverage before new tests:

Statements   : 84.3% ( 1681/1994 )
Branches     : 67.07% ( 495/738 )
Functions    : 85.25% ( 393/461 )
Lines        : 85.58% ( 1626/1900 )

Coverage after new tests:

Statements   : 85.61% ( 1707/1994 )
Branches     : 68.7% ( 507/738 )
Functions    : 87.2% ( 402/461 )
Lines        : 87% ( 1653/1900 )

@lightswitch05 lightswitch05 changed the title Added more unit tests or offset and zookeeper. Added more unit tests for offset and zookeeper. Aug 15, 2016
var topic = '_exist_topic_3_test';
var topics = [ { topic: topic } ];
offset.ready = false;
offset.fetch(topics, function (err) {
Copy link
Collaborator

@hyperlink hyperlink Aug 16, 2016

Choose a reason for hiding this comment

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

Could we just pass in done here as the callback?

@lightswitch05
Copy link
Contributor Author

@lightswitch05 lightswitch05 commented Aug 16, 2016

I updated the pull request per code review comments. Those were sloppy mistakes.


zk.addPartitionOwnership(consumerId, groupId, topic, 0, function (error) {
if (error) {
done(error);
Copy link
Collaborator

@hyperlink hyperlink Aug 16, 2016

Choose a reason for hiding this comment

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

Probably should add a return on this line.

Copy link
Contributor Author

@lightswitch05 lightswitch05 Aug 16, 2016

Choose a reason for hiding this comment

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

done

@hyperlink
Copy link
Collaborator

@hyperlink hyperlink commented Aug 16, 2016

LGTM. Thanks @lightswitch05

@hyperlink hyperlink merged commit 099ab53 into SOHU-Co:master Aug 16, 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.

None yet

2 participants