Browse Source

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

Reviewers: Guozhang Wang <wangguoz@gmail.com>

Closes #1879 from dguy/minor-fix-test
pull/1862/merge
Damian Guy 8 years ago committed by Guozhang Wang
parent
commit
8c07e0f31d
  1. 4
      streams/src/test/java/org/apache/kafka/streams/integration/QueryableStateIntegrationTest.java

4
streams/src/test/java/org/apache/kafka/streams/integration/QueryableStateIntegrationTest.java

@ -573,8 +573,8 @@ public class QueryableStateIntegrationTest { @@ -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) {

Loading…
Cancel
Save