You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/07/29 09:54:31 UTC

[GitHub] [kafka] showuon commented on a change in pull request #11129: Fix for flaky test in StoreQueryIntegrationTest

showuon commented on a change in pull request #11129:
URL: https://github.com/apache/kafka/pull/11129#discussion_r679004926



##########
File path: streams/src/test/java/org/apache/kafka/streams/integration/StoreQueryIntegrationTest.java
##########
@@ -153,10 +152,15 @@ public void shouldQueryOnlyActivePartitionStoresByDefault() throws Exception {
                 return true;
             } catch (final InvalidStateStoreException exception) {
                 assertThat(
-                    exception.getMessage(),
-                    containsString("Cannot get state store source-table because the stream thread is PARTITIONS_ASSIGNED, not RUNNING")
+                        exception.getMessage(),
+                        is(
+                                oneOf(
+                                        containsString("Cannot get state store source-table because the stream thread is PARTITIONS_ASSIGNED, not RUNNING"),
+                                        containsString("The state store, source-table, may have migrated to another instance")
+                                )
+                        )

Review comment:
       nit: Could we add a error reason in this assertion, so that when the exception message is not one of these 2 messages, we can know what happened. Ex: "Unexpected exception thrown while getting the value from store."




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org