(t *testing.T)
| 181 | } |
| 182 | |
| 183 | func TestOffsetCommitResponse(t *testing.T) { |
| 184 | // Fields are the same through version 2. |
| 185 | for _, version := range []int16{0, 1, 2} { |
| 186 | prototest.TestResponse(t, version, &offsetcommit.Response{ |
| 187 | Topics: []offsetcommit.ResponseTopic{ |
| 188 | { |
| 189 | Name: "topic-1", |
| 190 | Partitions: []offsetcommit.ResponsePartition{ |
| 191 | { |
| 192 | PartitionIndex: 4, |
| 193 | ErrorCode: 34, |
| 194 | }, |
| 195 | }, |
| 196 | }, |
| 197 | }, |
| 198 | }) |
| 199 | } |
| 200 | |
| 201 | // Version 3 added: |
| 202 | // ThrottleTimeMs |
| 203 | // Field are the same through version 7. |
| 204 | for _, version := range []int16{3, 4, 5, 6, 7} { |
| 205 | prototest.TestResponse(t, version, &offsetcommit.Response{ |
| 206 | ThrottleTimeMs: 10000, |
| 207 | Topics: []offsetcommit.ResponseTopic{ |
| 208 | { |
| 209 | Name: "topic-2", |
| 210 | Partitions: []offsetcommit.ResponsePartition{ |
| 211 | { |
| 212 | PartitionIndex: 2, |
| 213 | ErrorCode: 3, |
| 214 | }, |
| 215 | }, |
| 216 | }, |
| 217 | }, |
| 218 | }) |
| 219 | } |
| 220 | } |
nothing calls this directly
no test coverage detected