Repository: kafka
Updated Branches:
  refs/heads/trunk d9206500b -> 8c07e0f31


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 <damian....@gmail.com>

Reviewers: Guozhang Wang <wangg...@gmail.com>

Closes #1879 from dguy/minor-fix-test


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/8c07e0f3
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/8c07e0f3
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/8c07e0f3

Branch: refs/heads/trunk
Commit: 8c07e0f31d6a7b6bfa119bc557da6781324758bf
Parents: d920650
Author: Damian Guy <damian....@gmail.com>
Authored: Mon Sep 19 10:28:58 2016 -0700
Committer: Guozhang Wang <wangg...@gmail.com>
Committed: Mon Sep 19 10:28:58 2016 -0700

----------------------------------------------------------------------
 .../kafka/streams/integration/QueryableStateIntegrationTest.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/8c07e0f3/streams/src/test/java/org/apache/kafka/streams/integration/QueryableStateIntegrationTest.java
----------------------------------------------------------------------
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 6c17d2d..67eb4a7 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<KeyValue<String, Long>> 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) {

Reply via email to