(t *testing.T)
| 154 | } |
| 155 | |
| 156 | func TestProduceResponse(t *testing.T) { |
| 157 | prototest.TestResponse(t, v0, &produce.Response{ |
| 158 | Topics: []produce.ResponseTopic{ |
| 159 | { |
| 160 | Topic: "topic-1", |
| 161 | Partitions: []produce.ResponsePartition{ |
| 162 | { |
| 163 | Partition: 0, |
| 164 | ErrorCode: 0, |
| 165 | BaseOffset: 0, |
| 166 | }, |
| 167 | { |
| 168 | Partition: 1, |
| 169 | ErrorCode: 0, |
| 170 | BaseOffset: 42, |
| 171 | }, |
| 172 | }, |
| 173 | }, |
| 174 | }, |
| 175 | }) |
| 176 | |
| 177 | prototest.TestResponse(t, v8, &produce.Response{ |
| 178 | Topics: []produce.ResponseTopic{ |
| 179 | { |
| 180 | Topic: "topic-1", |
| 181 | Partitions: []produce.ResponsePartition{ |
| 182 | { |
| 183 | Partition: 0, |
| 184 | ErrorCode: 0, |
| 185 | BaseOffset: 42, |
| 186 | LogAppendTime: 1e9, |
| 187 | LogStartOffset: 10, |
| 188 | RecordErrors: []produce.ResponseError{}, |
| 189 | }, |
| 190 | { |
| 191 | Partition: 1, |
| 192 | ErrorCode: 1, |
| 193 | RecordErrors: []produce.ResponseError{ |
| 194 | {BatchIndex: 1, BatchIndexErrorMessage: "message-1"}, |
| 195 | {BatchIndex: 2, BatchIndexErrorMessage: "message-2"}, |
| 196 | {BatchIndex: 3, BatchIndexErrorMessage: "message-3"}, |
| 197 | }, |
| 198 | ErrorMessage: "something went wrong", |
| 199 | }, |
| 200 | }, |
| 201 | }, |
| 202 | }, |
| 203 | }) |
| 204 | } |
| 205 | |
| 206 | func BenchmarkProduceRequest(b *testing.B) { |
| 207 | t0 := time.Now().Truncate(time.Millisecond) |
nothing calls this directly
no test coverage detected