use of org.apache.kafka.clients.consumer.InvalidOffsetException in project apache-kafka-on-k8s by banzaicloud.
the class GlobalStateManagerImplTest method shouldRecoverFromInvalidOffsetExceptionAndRestoreRecords.
@Test
public void shouldRecoverFromInvalidOffsetExceptionAndRestoreRecords() {
initializeConsumer(2, 1, t1);
consumer.setException(new InvalidOffsetException("Try Again!") {
public Set<TopicPartition> partitions() {
return Collections.singleton(t1);
}
});
stateManager.initialize();
stateManager.register(store1, stateRestoreCallback);
assertEquals(2, stateRestoreCallback.restored.size());
}
Aggregations