gabriellefu commented on code in PR #23233:
URL: https://github.com/apache/kafka/pull/23233#discussion_r3918295895


##########
streams/src/test/java/org/apache/kafka/streams/processor/internals/StateManagerUtilConverterTest.java:
##########
@@ -55,31 +81,103 @@
 @MockitoSettings(strictness = Strictness.STRICT_STUBS)
 public class StateManagerUtilConverterTest {
 
-    @Test
-    public void 
shouldReturnIdentityConverterForPlainToTimestampedPersistentKeyValueStore() {
-        // persistent plain kv -> ts kv
-        final WrappedStateStore<?, ?, ?> mockWrapper = 
mock(WrappedStateStore.class);
-        final StateStore mockAdapter = 
mock(KeyValueToTimestampedKeyValueByteStoreAdapter.class);
+    private static final long TIMESTAMP = 42L;
+    private static final long WINDOW_START = 0L;
 
-        doReturn(mockAdapter).when(mockWrapper).wrapped();
+    // persistent plain kv/window -> ts kv/window (via 
KeyValueToTimestampedKeyValueByteStoreAdapter /
+    // WindowToTimestampedWindowByteStoreAdapter): restore bypasses the 
adapter and writes into the
+    // plain inner store directly, so the converter must be identity(). 
In-memory and persistent
+    // timestamped stores hold the timestamped format natively, so the 
converter must prepend it.
+    @ParameterizedTest
+    @MethodSource("keyValueConverterCases")
+    public void shouldReturnConverterForTimestampedKeyValueStore(final 
KeyValueBytesStoreSupplier supplier,
+                                                                  final 
RecordConverter expectedConverter) {

Review Comment:
   updated, thanks



-- 
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]

Reply via email to