From 8c07e0f31d6a7b6bfa119bc557da6781324758bf Mon Sep 17 00:00:00 2001 From: Damian Guy Date: Mon, 19 Sep 2016 10:28:58 -0700 Subject: [PATCH] HOTFIX: logic in QuerybaleStateIntegrationTest.shouldBeAbleToQueryState incorrect The logic in `verifyCanGetByKey` was incorrect. It was ``` windowState.size() < keys.length && countState.size() < keys.length && System.currentTimeMillis() < timeout ``` but should be: ``` (windowState.size() < keys.length || countState.size() < keys.length) && System.currentTimeMillis() < timeout ``` Author: Damian Guy Reviewers: Guozhang Wang Closes #1879 from dguy/minor-fix-test --- .../streams/integration/QueryableStateIntegrationTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 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 6c17d2df217..67eb4a73d0a 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 @@ -573,8 +573,8 @@ public class QueryableStateIntegrationTest { final Set> countState = new TreeSet<>(stringLongComparator); final long timeout = System.currentTimeMillis() + 30000; - while (windowState.size() < 5 && - countState.size() < 5 && + while ((windowState.size() < keys.length || + countState.size() < keys.length) && System.currentTimeMillis() < timeout) { Thread.sleep(10); for (final String key : keys) {