kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject kafka git commit: MINOR: catch InvalidStateStoreException in QueryableStateIntegrationTest
Date Mon, 12 Sep 2016 04:00:35 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 5f040cd77 -> a7ab9cb83


MINOR: catch InvalidStateStoreException in QueryableStateIntegrationTest

A couple of the tests may transiently fail in QueryableStateIntegrationTest as they are not
catching InvalidStateStoreException. This exception is expected during rebalance.

Author: Damian Guy <damian.guy@gmail.com>

Reviewers: Eno Thereska, Guozhang Wang

Closes #1840 from dguy/minor-fix


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

Branch: refs/heads/trunk
Commit: a7ab9cb83d2c47d980b0b9f6b702e01bd1cf4139
Parents: 5f040cd
Author: Damian Guy <damian.guy@gmail.com>
Authored: Sun Sep 11 21:00:32 2016 -0700
Committer: Guozhang Wang <wangguoz@gmail.com>
Committed: Sun Sep 11 21:00:32 2016 -0700

----------------------------------------------------------------------
 .../streams/integration/QueryableStateIntegrationTest.java    | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/a7ab9cb8/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 63bb081..04d36f1 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
@@ -247,7 +247,11 @@ public class QueryableStateIntegrationTest {
                     } catch (final IllegalStateException e) {
                         // Kafka Streams instance may have closed but rebalance hasn't happened
                         return false;
+                    } catch (final InvalidStateStoreException e) {
+                        // rebalance
+                        return false;
                     }
+
                     return store != null && store.get(key) != null;
                 }
             }, 30000, "waiting for metadata, store and value to be non null");
@@ -274,6 +278,9 @@ public class QueryableStateIntegrationTest {
                     } catch (final IllegalStateException e) {
                         // Kafka Streams instance may have closed but rebalance hasn't happened
                         return false;
+                    } catch (InvalidStateStoreException e) {
+                        // rebalance
+                        return false;
                     }
                     return store != null && store.fetch(key, from, to) != null;
                 }


Mime
View raw message