use of org.apache.kafka.streams.processor.FailOnInvalidTimestamp in project kafka by apache.
the class RecordQueueTest method shouldThrowOnNegativeTimestamp.
@Test(expected = StreamsException.class)
public void shouldThrowOnNegativeTimestamp() {
final List<ConsumerRecord<byte[], byte[]>> records = Collections.singletonList(new ConsumerRecord<>("topic", 1, 1, -1L, TimestampType.CREATE_TIME, 0L, 0, 0, recordKey, recordValue));
final RecordQueue queue = new RecordQueue(new TopicPartition(topics[0], 1), new MockSourceNode<>(topics, intDeserializer, intDeserializer), new FailOnInvalidTimestamp());
queue.addRawRecords(records);
}
Aggregations