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 2020/12/03 15:03:16 UTC

[GitHub] [kafka] cadonna opened a new pull request #9681: MINOR: Fix flaky test shouldQueryOnlyActivePartitionStoresByDefault

cadonna opened a new pull request #9681:
URL: https://github.com/apache/kafka/pull/9681


   
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


----------------------------------------------------------------
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.

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



[GitHub] [kafka] cadonna commented on pull request #9681: MINOR: Fix flaky test shouldQueryOnlyActivePartitionStoresByDefault

Posted by GitBox <gi...@apache.org>.
cadonna commented on pull request #9681:
URL: https://github.com/apache/kafka/pull/9681#issuecomment-738054912


   Call for review: @vvcephei @ableegoldman @guozhangwang 


----------------------------------------------------------------
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.

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



[GitHub] [kafka] guozhangwang commented on pull request #9681: MINOR: Fix flaky test shouldQueryOnlyActivePartitionStoresByDefault

Posted by GitBox <gi...@apache.org>.
guozhangwang commented on pull request #9681:
URL: https://github.com/apache/kafka/pull/9681#issuecomment-761078960


   Cherry-picked to 2.7


----------------------------------------------------------------
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.

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



[GitHub] [kafka] cadonna commented on a change in pull request #9681: MINOR: Fix flaky test shouldQueryOnlyActivePartitionStoresByDefault

Posted by GitBox <gi...@apache.org>.
cadonna commented on a change in pull request #9681:
URL: https://github.com/apache/kafka/pull/9681#discussion_r535310939



##########
File path: streams/src/test/java/org/apache/kafka/streams/integration/StoreQueryIntegrationTest.java
##########
@@ -136,13 +136,13 @@ public void shouldQueryOnlyActivePartitionStoresByDefault() throws Exception {
 
             final boolean kafkaStreams1IsActive = (keyQueryMetadata.activeHost().port() % 2) == 1;
 
-            // Assert that only active is able to query for a key by default
-            assertThat(kafkaStreams1IsActive ? store1.get(key) : store2.get(key), is(notNullValue()));

Review comment:
       Last time we forgot to move this line into the `try-catch-clause`.

##########
File path: streams/src/test/java/org/apache/kafka/streams/integration/StoreQueryIntegrationTest.java
##########
@@ -136,13 +136,13 @@ public void shouldQueryOnlyActivePartitionStoresByDefault() throws Exception {
 
             final boolean kafkaStreams1IsActive = (keyQueryMetadata.activeHost().port() % 2) == 1;
 
-            // Assert that only active is able to query for a key by default
-            assertThat(kafkaStreams1IsActive ? store1.get(key) : store2.get(key), is(notNullValue()));
             try {
                 if (kafkaStreams1IsActive) {
+                    assertThat(store1.get(key), is(notNullValue()));
                     assertThat(store2.get(key), is(nullValue()));
                 } else {
                     assertThat(store1.get(key), is(nullValue()));
+                    assertThat(store2.get(key), is(notNullValue()));
                 }

Review comment:
       I thought this is easier readable.




----------------------------------------------------------------
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.

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



[GitHub] [kafka] guozhangwang merged pull request #9681: MINOR: Fix flaky test shouldQueryOnlyActivePartitionStoresByDefault

Posted by GitBox <gi...@apache.org>.
guozhangwang merged pull request #9681:
URL: https://github.com/apache/kafka/pull/9681


   


----------------------------------------------------------------
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.

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