This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/2.0 by this push:
     new fc39e06  MINOR: improve QueryableStateIntegrationTest (#5987)
fc39e06 is described below

commit fc39e0639fee0e048e6d22f129ac3aed2a5abb63
Author: Guozhang Wang <wangg...@gmail.com>
AuthorDate: Sun Dec 2 22:17:01 2018 -0800

    MINOR: improve QueryableStateIntegrationTest (#5987)
---
 .../integration/QueryableStateIntegrationTest.java   | 20 +++-----------------
 1 file changed, 3 insertions(+), 17 deletions(-)

diff --git 
a/streams/src/test/java/org/apache/kafka/streams/integration/QueryableStateIntegrationTest.java
 
b/streams/src/test/java/org/apache/kafka/streams/integration/QueryableStateIntegrationTest.java
index ff791be..82bf849 100644
--- 
a/streams/src/test/java/org/apache/kafka/streams/integration/QueryableStateIntegrationTest.java
+++ 
b/streams/src/test/java/org/apache/kafka/streams/integration/QueryableStateIntegrationTest.java
@@ -190,24 +190,10 @@ public class QueryableStateIntegrationTest {
         streamsConfiguration.put(StreamsConfig.COMMIT_INTERVAL_MS_CONFIG, 100);
         // override this to make the rebalances happen quickly
         
streamsConfiguration.put(IntegrationTestUtils.INTERNAL_LEAVE_GROUP_ON_CLOSE, 
true);
+        
+        stringComparator = Comparator.comparing((KeyValue<String, String> o) 
-> o.key).thenComparing(o -> o.value);
+        stringLongComparator = Comparator.comparing((KeyValue<String, Long> o) 
-> o.key).thenComparingLong(o -> o.value);
 
-
-        stringComparator = new Comparator<KeyValue<String, String>>() {
-
-            @Override
-            public int compare(final KeyValue<String, String> o1,
-                               final KeyValue<String, String> o2) {
-                return o1.key.compareTo(o2.key);
-            }
-        };
-        stringLongComparator = new Comparator<KeyValue<String, Long>>() {
-
-            @Override
-            public int compare(final KeyValue<String, Long> o1,
-                               final KeyValue<String, Long> o2) {
-                return o1.key.compareTo(o2.key);
-            }
-        };
         inputValues = getInputValues();
         inputValuesKeys = new HashSet<>();
         for (final String sentence : inputValues) {

Reply via email to