(t *testing.T)
| 22 | ) |
| 23 | |
| 24 | func TestFuncConsumerOffsetOutOfRange(t *testing.T) { |
| 25 | setupFunctionalTest(t) |
| 26 | defer teardownFunctionalTest(t) |
| 27 | |
| 28 | consumer, err := NewConsumer(FunctionalTestEnv.KafkaBrokerAddrs, NewFunctionalTestConfig()) |
| 29 | if err != nil { |
| 30 | t.Fatal(err) |
| 31 | } |
| 32 | |
| 33 | if _, err := consumer.ConsumePartition("test.1", 0, -10); !errors.Is(err, ErrOffsetOutOfRange) { |
| 34 | t.Error("Expected ErrOffsetOutOfRange, got:", err) |
| 35 | } |
| 36 | |
| 37 | if _, err := consumer.ConsumePartition("test.1", 0, math.MaxInt64); !errors.Is(err, ErrOffsetOutOfRange) { |
| 38 | t.Error("Expected ErrOffsetOutOfRange, got:", err) |
| 39 | } |
| 40 | |
| 41 | safeClose(t, consumer) |
| 42 | } |
| 43 | |
| 44 | func TestConsumerHighWaterMarkOffset(t *testing.T) { |
| 45 | setupFunctionalTest(t) |
nothing calls this directly
no test coverage detected