(t *testing.T)
| 194 | } |
| 195 | |
| 196 | func TestConsumerWithExpectationsOnUnconsumedPartition(t *testing.T) { |
| 197 | trm := newTestReporterMock() |
| 198 | consumer := NewConsumer(trm, NewTestConfig()) |
| 199 | consumer.ExpectConsumePartition("test", 0, sarama.OffsetOldest).YieldMessage(&sarama.ConsumerMessage{Value: []byte("hello world")}) |
| 200 | |
| 201 | if err := consumer.Close(); err != nil { |
| 202 | t.Error("No error expected on close, but found:", err) |
| 203 | } |
| 204 | |
| 205 | if len(trm.errors) != 1 { |
| 206 | t.Errorf("Expected an expectation failure to be set on the error reporter.") |
| 207 | } |
| 208 | } |
| 209 | |
| 210 | func TestConsumerWithWrongOffsetExpectation(t *testing.T) { |
| 211 | trm := newTestReporterMock() |
nothing calls this directly
no test coverage detected