nicktelford commented on code in PR #21578:
URL: https://github.com/apache/kafka/pull/21578#discussion_r2854257292
##########
streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBStoreTest.java:
##########
@@ -222,6 +223,21 @@ public void
shouldAddValueProvidersWithStatisticsToInjectedMetricsRecorderWhenRe
verify(metricsRecorder).addValueProviders(eq(DB_NAME), notNull(),
notNull(), notNull());
}
+ @Test
+ public void shouldCommitOffsets() {
+ final TopicPartition tp0 = new TopicPartition("topic-0", 0);
+ final TopicPartition tp1 = new TopicPartition("topic-1", 0);
+ final Map<TopicPartition, Long> offsetsToCommit = Map.of(tp0, 100L,
tp1, 200L);
+ rocksDBStore = getRocksDBStore();
+ rocksDBStore.init(context, rocksDBStore);
+ rocksDBStore.commit(offsetsToCommit);
+ rocksDBStore.close();
+ rocksDBStore.init(context, rocksDBStore);
+ assertEquals(100L, rocksDBStore.committedOffset(tp0));
+ assertEquals(200L, rocksDBStore.committedOffset(tp1));
+ rocksDBStore.close();
+ }
+
Review Comment:
~As per my above comment: I don't think we should actually enable using
these offsets until KIP-892 lands. So perhaps here we should have a test that
verifies that offsets _aren't_ used/stored?~
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]