(t *testing.T)
| 176 | } |
| 177 | |
| 178 | func TestConsumerWithoutExpectationsOnPartition(t *testing.T) { |
| 179 | trm := newTestReporterMock() |
| 180 | consumer := NewConsumer(trm, NewTestConfig()) |
| 181 | |
| 182 | _, err := consumer.ConsumePartition("test", 1, sarama.OffsetOldest) |
| 183 | if !errors.Is(err, errOutOfExpectations) { |
| 184 | t.Error("Expected ConsumePartition to return errOutOfExpectations") |
| 185 | } |
| 186 | |
| 187 | if err := consumer.Close(); err != nil { |
| 188 | t.Error("No error expected on close, but found:", err) |
| 189 | } |
| 190 | |
| 191 | if len(trm.errors) != 1 { |
| 192 | t.Errorf("Expected an expectation failure to be set on the error reporter.") |
| 193 | } |
| 194 | } |
| 195 | |
| 196 | func TestConsumerWithExpectationsOnUnconsumedPartition(t *testing.T) { |
| 197 | trm := newTestReporterMock() |
nothing calls this directly
no test coverage detected