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 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) {

This comment has been minimized.

Copy link
@hyperlink

hyperlink Aug 16, 2016

Collaborator

Could we just pass in done here as the callback?

var topic = '_exist_topic_3_test';
var topics = [ { topic: topic, offset: 10 } ];
offset.ready = false;
offset.commit('_groupId_commit_test', topics, function (err) {

This comment has been minimized.

Copy link
@hyperlink

hyperlink Aug 16, 2016

Collaborator

Same as line 67.

@lightswitch05 lightswitch05 force-pushed the lightswitch05:feature/more-testing branch from 47e0d54 to 67e1da9 Aug 16, 2016
@lightswitch05

This comment has been minimized.

Copy link
Contributor Author

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);

This comment has been minimized.

Copy link
@hyperlink

hyperlink Aug 16, 2016

Collaborator

Probably should add a return on this line.

This comment has been minimized.

Copy link
@lightswitch05

lightswitch05 Aug 16, 2016

Author Contributor

done

@lightswitch05 lightswitch05 force-pushed the lightswitch05:feature/more-testing branch from 67e1da9 to 6e5e525 Aug 16, 2016
@hyperlink

This comment has been minimized.

Copy link
Collaborator

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
Projects
None yet
2 participants
You can’t perform that action at this time.