-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Adds missing mock responses for mocking consumer group #1750
Adds missing mock responses for mocking consumer group #1750
Conversation
ebbd858
to
94dce3e
Compare
@krantideep95 any chance you can add the CLA so this can be merged? I could really use the consumer group mocks as well. I am also using your |
@seanschade I have signed the CLA. I think CLA check is failing for @carldunham whose branch I used for 1st commit. |
d80a202
to
8920ded
Compare
8920ded
to
01bfe37
Compare
01bfe37
to
bbb3be8
Compare
…onse, MockHeartbeatResponse for mocking consumer groups Squashed commit of the following: commit d80a202 Merge: 6dbd2ce 65f0fec Author: Kranti Deep <[email protected]> Date: Sun Oct 11 22:37:51 2020 +0530 Merge branch 'master' into cd/1577/consumer-group-mocks commit 6dbd2ce Merge: 94dce3e c1c2a08 Author: Kranti Deep <[email protected]> Date: Wed Aug 12 20:46:55 2020 +0530 Merge branch 'master' into cd/1577/consumer-group-mocks commit 94dce3e Author: Kranti Deep <[email protected]> Date: Sun Jul 12 23:05:21 2020 +0530 change return type of MockJoinGroupResponse.For, MockHeartbeatResponse.For & MockLeaveGroupResponse.For to encoderWithHeader commit ac5ca79 Merge: e81f001 5933302 Author: Kranti Deep <[email protected]> Date: Sun Jul 12 22:52:16 2020 +0530 Merge branch 'master' into cd/1577/consumer-group-mocks commit e81f001 Author: Carl Dunham <[email protected]> Date: Tue Feb 25 16:40:16 2020 -0500 add basic mocks for consumer group responses
bbb3be8
to
bfa6061
Compare
Sorry to be late here. Looks like you were able to bypass me, tho. |
@krantideep95 it looks like one of the files is no go formatted |
@carldunham yeah, I squashed merged all your & my commits into 1 commit. 🙈 |
Thanks @krantideep95 |
} | ||
|
||
func (m *MockSyncGroupResponse) For(reqBody versionedDecoder) encoderWithHeader { | ||
resp := &SyncGroupResponse{ |
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.
Hi @krantideep95, I'm confused whether I can set the value of attribute Version in SyncGroupResponse, like what other MockResponse did, eg
func (m *MockApiVersionsResponse) For(reqBody versionedDecoder) encoderWithHeader {
req := reqBody.(*ApiVersionsRequest)
res := &ApiVersionsResponse{
Version: req.Version,
ApiKeys: m.apiKeys,
}
return res
}
Without the setting, the Version in the SyncGroupResponse is always 0.
In one of my test cases, kafka consumer version is V2.8.1, Version in the SyncGroupRequest is 3 while in the SyncGroupResponse is 0, that will lead to an ErrInsufficientData error.
No description provided.