(t *testing.T)
| 47 | } |
| 48 | |
| 49 | func TestClientFetch(t *testing.T) { |
| 50 | client, topic, shutdown := newLocalClientAndTopic() |
| 51 | defer shutdown() |
| 52 | |
| 53 | records := produceRecords(t, 10, client.Addr, topic, nil) |
| 54 | |
| 55 | res, err := client.Fetch(context.Background(), &FetchRequest{ |
| 56 | Topic: topic, |
| 57 | Partition: 0, |
| 58 | Offset: 0, |
| 59 | MinBytes: 1, |
| 60 | MaxBytes: 64 * 1024, |
| 61 | MaxWait: 100 * time.Millisecond, |
| 62 | }) |
| 63 | |
| 64 | if err != nil { |
| 65 | t.Fatal(err) |
| 66 | } |
| 67 | |
| 68 | assertFetchResponse(t, res, &FetchResponse{ |
| 69 | Topic: topic, |
| 70 | Partition: 0, |
| 71 | HighWatermark: 10, |
| 72 | Records: NewRecordReader(records...), |
| 73 | }) |
| 74 | } |
| 75 | |
| 76 | func TestClientFetchCompressed(t *testing.T) { |
| 77 | client, topic, shutdown := newLocalClientAndTopic() |
nothing calls this directly
no test coverage detected