You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/09/27 04:26:09 UTC

[GitHub] [pulsar] coderzc opened a new pull request, #17848: [fix][flask-test] Fix and improve LookupRetryTest

coderzc opened a new pull request, #17848:
URL: https://github.com/apache/pulsar/pull/17848

   Fixes #17785
   
   ### Motivation
   
   The `failureMap` need to be clear after run per unit test.
   
   ### Modifications
   
   Clear `failureMap` after run per unit test, and only run once `setup()`/`claenup()` to reduce execution time.
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc-required` 
   (Your PR needs to update docs and you will update later)
   
   - [x] `doc-not-needed` 
   (Please explain why)
   
   - [ ] `doc` 
   (Your PR contains doc changes)
   
   - [ ] `doc-complete`
   (Docs have been already added)
   
   ### Matching PR in forked repository
   
   PR in forked repository: <!-- ENTER URL HERE 
   
   After opening this PR, the build in apache/pulsar will fail and instructions will
   be provided for opening a PR in the PR author's forked repository.
   
   apache/pulsar pull requests should be first tested in your own fork since the 
   apache/pulsar CI based on GitHub Actions has constrained resources and quota.
   GitHub Actions provides separate quota for pull requests that are executed in 
   a forked repository.
   
   The tests will be run in the forked repository until all PR review comments have
   been handled, the tests pass and the PR is approved by a reviewer.
   
   -->
   


-- 
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: commits-unsubscribe@pulsar.apache.org

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


[GitHub] [pulsar] coderzc commented on pull request #17848: [fix][flask-test] Fix and improve LookupRetryTest

Posted by GitBox <gi...@apache.org>.
coderzc commented on PR #17848:
URL: https://github.com/apache/pulsar/pull/17848#issuecomment-1260323473

   /pulsarbot run-failure-checks


-- 
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: commits-unsubscribe@pulsar.apache.org

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


[GitHub] [pulsar] tisonkun commented on pull request #17848: [fix][flask-test] Fix and improve LookupRetryTest

Posted by GitBox <gi...@apache.org>.
tisonkun commented on PR #17848:
URL: https://github.com/apache/pulsar/pull/17848#issuecomment-1258978939

   @coderzc although, can you explain a bit about how this patch fix the original issue? 
   
   The original failure reports:
   
   ```
     Error:  testCloseConnectionOnBrokerRejectedRequest(org.apache.pulsar.client.impl.LookupRetryTest)  Time elapsed: 2.146 s  <<< FAILURE!
     java.lang.AssertionError: expected [2] but found [1]
     	at org.testng.Assert.fail(Assert.java:99)
     	at org.testng.Assert.failNotEquals(Assert.java:1037)
     	at org.testng.Assert.assertEqualsImpl(Assert.java:140)
     	at org.testng.Assert.assertEquals(Assert.java:122)
     	at org.testng.Assert.assertEquals(Assert.java:907)
     	at org.testng.Assert.assertEquals(Assert.java:917)
     	at org.apache.pulsar.client.impl.LookupRetryTest.testCloseConnectionOnBrokerRejectedRequest(LookupRetryTest.java:217)
   ```
   
   That doesn't directly related to the hash map.


-- 
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: commits-unsubscribe@pulsar.apache.org

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


[GitHub] [pulsar] congbobo184 merged pull request #17848: [fix][flask-test] Fix and improve LookupRetryTest

Posted by GitBox <gi...@apache.org>.
congbobo184 merged PR #17848:
URL: https://github.com/apache/pulsar/pull/17848


-- 
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: commits-unsubscribe@pulsar.apache.org

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


[GitHub] [pulsar] tisonkun commented on a diff in pull request #17848: [fix][flask-test] Fix and improve LookupRetryTest

Posted by GitBox <gi...@apache.org>.
tisonkun commented on code in PR #17848:
URL: https://github.com/apache/pulsar/pull/17848#discussion_r980740509


##########
pulsar-broker/src/test/java/org/apache/pulsar/client/impl/LookupRetryTest.java:
##########
@@ -94,12 +88,18 @@ protected ServerCnx newServerCnx(PulsarService pulsar, String listenerName) thro
         };
     }
 
-    @AfterMethod(alwaysRun = true)
+    @AfterClass

Review Comment:
   ```suggestion
       @AfterClass(alwaysRun = true)
   ```
   ?



-- 
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: commits-unsubscribe@pulsar.apache.org

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


[GitHub] [pulsar] tisonkun commented on pull request #17848: [fix][flask-test] Fix and improve LookupRetryTest

Posted by GitBox <gi...@apache.org>.
tisonkun commented on PR #17848:
URL: https://github.com/apache/pulsar/pull/17848#issuecomment-1259222377

   /pulsarbot run-failure-checks


-- 
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: commits-unsubscribe@pulsar.apache.org

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


[GitHub] [pulsar] coderzc commented on pull request #17848: [fix][flask-test] Fix and improve LookupRetryTest

Posted by GitBox <gi...@apache.org>.
coderzc commented on PR #17848:
URL: https://github.com/apache/pulsar/pull/17848#issuecomment-1258999303

   > @coderzc although, can you explain a bit about how this patch fix the original issue?
   > 
   > The original failure reports:
   > 
   > ```
   >   Error:  testCloseConnectionOnBrokerRejectedRequest(org.apache.pulsar.client.impl.LookupRetryTest)  Time elapsed: 2.146 s  <<< FAILURE!
   >   java.lang.AssertionError: expected [2] but found [1]
   >   	at org.testng.Assert.fail(Assert.java:99)
   >   	at org.testng.Assert.failNotEquals(Assert.java:1037)
   >   	at org.testng.Assert.assertEqualsImpl(Assert.java:140)
   >   	at org.testng.Assert.assertEquals(Assert.java:122)
   >   	at org.testng.Assert.assertEquals(Assert.java:907)
   >   	at org.testng.Assert.assertEquals(Assert.java:917)
   >   	at org.apache.pulsar.client.impl.LookupRetryTest.testCloseConnectionOnBrokerRejectedRequest(LookupRetryTest.java:217)
   > ```
   > 
   > That doesn't directly related to the hash map.
   
   Oh, I haven't found the root cause of the original case for the time being, but when I have repeatedly executed `testCloseConnectionOnBrokerRejectedRequest` many times, if don‘t clear`failureMap` will cause similar problems.


-- 
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: commits-unsubscribe@pulsar.apache.org

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