dengziming commented on a change in pull request #10701:
URL: https://github.com/apache/kafka/pull/10701#discussion_r652297960



##########
File path: 
streams/examples/src/test/java/org/apache/kafka/streams/examples/wordcount/WordCountTransformerTest.java
##########
@@ -45,11 +50,26 @@ public void test() {
                 .withLoggingDisabled() // Changelog is not supported by 
MockProcessorContext.
                 // Caching is disabled by default, but FYI: caching is also 
not supported by MockProcessorContext.
                 .build();
-            store.init(context, store);
-            context.register(store, null);
+            store.init(context.getStateStoreContext(), store);
+            context.getStateStoreContext().register(store, null);
         }
         final Transformer<String, String, KeyValue<String, String>> 
transformer = supplier.get();
-        transformer.init(context);
+        transformer.init(new 
org.apache.kafka.streams.processor.MockProcessorContext() {
+            @Override
+            public <S extends StateStore> S getStateStore(final String name) {
+                return context.getStateStore(name);
+            }
+
+            @Override
+            public <K, V> void forward(final K key, final V value) {
+                context.forward(new Record<>(key.toString(), value.toString(), 
0L));

Review comment:
       Yes, both K and V are types of String here, we should use cast here.




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to