kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mj...@apache.org
Subject [kafka] branch trunk updated: MINOR: Add attributes `processedKeys` and `processedValues` to MockProcessorSupplier (#3999)
Date Wed, 07 Feb 2018 19:53:10 GMT
This is an automated email from the ASF dual-hosted git repository.

mjsax pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 4ee5182  MINOR: Add attributes `processedKeys` and `processedValues` to MockProcessorSupplier
(#3999)
4ee5182 is described below

commit 4ee5182f35d612daa223f890b9eaad08655b761b
Author: Mats Julian Olsen <mats@plysjbyen.net>
AuthorDate: Wed Feb 7 20:53:07 2018 +0100

    MINOR: Add attributes `processedKeys` and `processedValues` to MockProcessorSupplier (#3999)
    
    Author: Mats Julian Olsen
    
    Reviewers: Guozhang Wang <guozhang@confluent.io>, Matthias J. Sax <matthias@confluent.io>
---
 .../src/test/java/org/apache/kafka/test/MockProcessorSupplier.java   | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/streams/src/test/java/org/apache/kafka/test/MockProcessorSupplier.java b/streams/src/test/java/org/apache/kafka/test/MockProcessorSupplier.java
index c464aaa..bdc8d40 100644
--- a/streams/src/test/java/org/apache/kafka/test/MockProcessorSupplier.java
+++ b/streams/src/test/java/org/apache/kafka/test/MockProcessorSupplier.java
@@ -31,6 +31,9 @@ import static org.junit.Assert.assertEquals;
 public class MockProcessorSupplier<K, V> implements ProcessorSupplier<K, V> {
 
     public final ArrayList<String> processed = new ArrayList<>();
+    public final ArrayList<K> processedKeys = new ArrayList<>();
+    public final ArrayList<V> processedValues = new ArrayList<>();
+
     public final ArrayList<Long> punctuatedStreamTime = new ArrayList<>();
     public final ArrayList<Long> punctuatedSystemTime = new ArrayList<>();
 
@@ -86,6 +89,8 @@ public class MockProcessorSupplier<K, V> implements ProcessorSupplier<K,
V> {
 
         @Override
         public void process(K key, V value) {
+            processedKeys.add(key);
+            processedValues.add(value);
             processed.add((key == null ? "null" : key) + ":" +
                     (value == null ? "null" : value));
 

-- 
To stop receiving notification emails like this one, please contact
mjsax@apache.org.

Mime
View raw message