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

Fix kafka:tail for v6 compatibility #161

Merged
merged 3 commits into from May 31, 2017
Merged

Fix kafka:tail for v6 compatibility #161

merged 3 commits into from May 31, 2017

Conversation

msakrejda
Copy link
Contributor

No description provided.

@idan idan added the Doing label May 31, 2017
@msakrejda msakrejda changed the title WIP -- do not merge Fix kafka:tail for v6 compatibility May 31, 2017
@msakrejda msakrejda requested review from fnando, idan and jdx May 31, 2017 21:09
This lets us be compatible with v6 CLI.

Also change some exits to throw instead and let the CLI handle errors,
and update tests to work with the new mechanism. The changes require
us to mock out `process` in tests, so we export it from the command
and let our tests override it.
@@ -106,59 +121,65 @@ describe('kafka:topics:tail', () => {
consumer.subscribe = (topic, callback) => {
callback([
{ offset: 1, message: { value: Buffer.from('hello') } },
{ offset: 2, message: { value: Buffer.from('world') } }
{ offset: 2, message: { value: Buffer.from('world') } },
{ offset: 3, message: { value: null } }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I also added a null-valued message since that goes through a slightly different code path.

@msakrejda
Copy link
Contributor Author

/cc @ahamidi

@coveralls
Copy link

Coverage Status

Coverage increased (+0.4%) to 89.091% when pulling 0fd7760 on v6-compatibility into 02d5ac4 on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.4%) to 89.091% when pulling 0fd7760 on v6-compatibility into 02d5ac4 on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.4%) to 89.091% when pulling d54d8f9 on v6-compatibility into 02d5ac4 on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.4%) to 89.073% when pulling 0dd2d66 on v6-compatibility into 02d5ac4 on master.

@msakrejda msakrejda merged commit 1dbf47d into master May 31, 2017
@msakrejda msakrejda deleted the v6-compatibility branch May 31, 2017 23:48
@idan idan removed the Doing label May 31, 2017
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

5 participants