(t *testing.T)
| 182 | } |
| 183 | |
| 184 | func TestOffsetFetchResponseMultipleGroupsV8(t *testing.T) { |
| 185 | response := OffsetFetchResponse{ |
| 186 | Version: 8, |
| 187 | ThrottleTimeMs: 9, |
| 188 | Blocks: map[string]map[int32]*OffsetFetchResponseBlock{}, |
| 189 | Groups: []OffsetFetchResponseGroup{ |
| 190 | {GroupId: "blah", Blocks: map[string]map[int32]*OffsetFetchResponseBlock{}, Err: ErrNoError}, |
| 191 | {GroupId: "qux", Blocks: map[string]map[int32]*OffsetFetchResponseBlock{}, Err: ErrInvalidRequest}, |
| 192 | }, |
| 193 | } |
| 194 | testResponse(t, "two groups v8", &response, offsetFetchResponseTwoGroupsV8) |
| 195 | |
| 196 | decoded := new(OffsetFetchResponse) |
| 197 | require.NoError(t, versionedDecode(offsetFetchResponseTwoGroupsV8, decoded, 8, nil)) |
| 198 | require.Len(t, decoded.Groups, 2) |
| 199 | assert.Equal(t, "blah", decoded.Groups[0].GroupId) |
| 200 | assert.Equal(t, ErrNoError, decoded.Groups[0].Err) |
| 201 | assert.Equal(t, "qux", decoded.Groups[1].GroupId) |
| 202 | assert.Equal(t, ErrInvalidRequest, decoded.Groups[1].Err) |
| 203 | assert.Equal(t, ErrNoError, decoded.GroupError()) |
| 204 | } |
nothing calls this directly
no test coverage detected