MCPcopy
hub / github.com/IBM/sarama / TestOffsetCommitRequestV5AndPlus

Function TestOffsetCommitRequestV5AndPlus

offset_commit_request_test.go:161–244  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

159)
160
161func TestOffsetCommitRequestV5AndPlus(t *testing.T) {
162 groupInstanceId := "gid"
163 tests := []struct {
164 CaseName string
165 Version int16
166 MessageBytes []byte
167 Message *OffsetCommitRequest
168 }{
169 {
170 "v5",
171 5,
172 offsetCommitRequestOneBlockV5,
173 &OffsetCommitRequest{
174 Version: 5,
175 ConsumerGroup: "foo",
176 ConsumerGroupGeneration: 1,
177 ConsumerID: "mid",
178 blocks: map[string]map[int32]*offsetCommitRequestBlock{
179 "topic": {
180 1: &offsetCommitRequestBlock{offset: 2, metadata: "meta"},
181 },
182 },
183 },
184 },
185 {
186 "v6",
187 6,
188 offsetCommitRequestOneBlockV6,
189 &OffsetCommitRequest{
190 Version: 6,
191 ConsumerGroup: "foo",
192 ConsumerGroupGeneration: 1,
193 ConsumerID: "mid",
194 blocks: map[string]map[int32]*offsetCommitRequestBlock{
195 "topic": {
196 1: &offsetCommitRequestBlock{offset: 2, metadata: "meta", committedLeaderEpoch: 3},
197 },
198 },
199 },
200 },
201 {
202 "v7",
203 7,
204 offsetCommitRequestOneBlockV7,
205 &OffsetCommitRequest{
206 Version: 7,
207 ConsumerGroup: "foo",
208 ConsumerGroupGeneration: 1,
209 ConsumerID: "mid",
210 GroupInstanceId: &groupInstanceId,
211 blocks: map[string]map[int32]*offsetCommitRequestBlock{
212 "topic": {
213 1: &offsetCommitRequestBlock{offset: 2, metadata: "meta", committedLeaderEpoch: 3},
214 },
215 },
216 },
217 },
218 {

Callers

nothing calls this directly

Calls 3

testVersionDecodableFunction · 0.85
testEncodableFunction · 0.85
ErrorfMethod · 0.65

Tested by

no test coverage detected