(t *testing.T)
| 53 | } |
| 54 | |
| 55 | func testWriteFetchRequestV2(t *testing.T) { |
| 56 | const offset = 42 |
| 57 | const minBytes = 10 |
| 58 | const maxBytes = 1000 |
| 59 | const maxWait = 100 * time.Millisecond |
| 60 | testWriteOptimization(t, |
| 61 | requestHeader{ |
| 62 | ApiKey: int16(fetch), |
| 63 | ApiVersion: int16(v2), |
| 64 | CorrelationID: testCorrelationID, |
| 65 | ClientID: testClientID, |
| 66 | }, |
| 67 | fetchRequestV2{ |
| 68 | ReplicaID: -1, |
| 69 | MaxWaitTime: milliseconds(maxWait), |
| 70 | MinBytes: minBytes, |
| 71 | Topics: []fetchRequestTopicV2{{ |
| 72 | TopicName: testTopic, |
| 73 | Partitions: []fetchRequestPartitionV2{{ |
| 74 | Partition: testPartition, |
| 75 | FetchOffset: offset, |
| 76 | MaxBytes: maxBytes, |
| 77 | }}, |
| 78 | }}, |
| 79 | }, |
| 80 | func(w *writeBuffer) { |
| 81 | w.writeFetchRequestV2(testCorrelationID, testClientID, testTopic, testPartition, offset, minBytes, maxBytes, maxWait) |
| 82 | }, |
| 83 | ) |
| 84 | } |
| 85 | |
| 86 | func testWriteListOffsetRequestV1(t *testing.T) { |
| 87 | const time = -1 |
nothing calls this directly
no test coverage detected