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/03/29 08:01:35 UTC

[GitHub] [pulsar] Demogorgon314 opened a new pull request #14922: [fix][test] Fix clear transaction buffer snapshot flaky test

Demogorgon314 opened a new pull request #14922:
URL: https://github.com/apache/pulsar/pull/14922


   ### Motivation
   ```
   java.lang.AssertionError: 
   Expected :true
   Actual   :false
   <Click to see difference>
   	at org.testng.Assert.fail(Assert.java:99)
   	at org.testng.Assert.failNotEquals(Assert.java:1037)
   	at org.testng.Assert.assertTrue(Assert.java:45)
   	at org.testng.Assert.assertTrue(Assert.java:55)
   	at org.apache.pulsar.broker.transaction.TopicTransactionBufferRecoverTest.checkSnapshotCount(TopicTransactionBufferRecoverTest.java:452)
   	at org.apache.pulsar.broker.transaction.TopicTransactionBufferRecoverTest.clearTransactionBufferSnapshotTest(TopicTransactionBufferRecoverTest.java:427)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
   	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
   // ...
   ```
   
   Currently, the clear transaction buffer snapshot is flaky, because we used `@Cleanup`, the `@Cleanup` annotation will put the close producer method to the bottom of the test method, then the producer will close after deleting the topic. 
   
   When we delete the topic, all relevant producers will receive a `CLOSE_PRODUCER` command, then the producer client will try to reconnect to the broker, so it will send the `PRODUCER` command again, then the transaction buffer snapshot will take a new snapshot, so the test will fail.
   
   ### Modifications
   
   Make the producer close before the topic deleting.
   
   ### Documentation
   
   Check the box below or label this PR directly (if you have committer privilege).
   
   Need to update docs? 
   
   - [ ] `doc-required` 
     
     (If you need help on updating docs, create a doc issue)
     
   - [ ] `no-need-doc` 
     
     (Please explain why)
     
   - [ ] `doc` 
     
     (If this PR contains doc changes)
   
   
   


-- 
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] Demogorgon314 commented on pull request #14922: [fix][test] Fix clear transaction buffer snapshot flaky test

Posted by GitBox <gi...@apache.org>.
Demogorgon314 commented on pull request #14922:
URL: https://github.com/apache/pulsar/pull/14922#issuecomment-1081650742


   /pulsarbot rerun-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] Demogorgon314 commented on pull request #14922: [fix][test] Fix clear transaction buffer snapshot flaky test

Posted by GitBox <gi...@apache.org>.
Demogorgon314 commented on pull request #14922:
URL: https://github.com/apache/pulsar/pull/14922#issuecomment-1081698887


   /pulsarbot rerun-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] Demogorgon314 commented on pull request #14922: [fix][test] Fix clear transaction buffer snapshot flaky test

Posted by GitBox <gi...@apache.org>.
Demogorgon314 commented on pull request #14922:
URL: https://github.com/apache/pulsar/pull/14922#issuecomment-1081699058


   /pulsarbot rerun-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] Demogorgon314 commented on pull request #14922: [fix][test] Fix clear transaction buffer snapshot flaky test

Posted by GitBox <gi...@apache.org>.
Demogorgon314 commented on pull request #14922:
URL: https://github.com/apache/pulsar/pull/14922#issuecomment-1081699284


   /pulsarbot rerun-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] Demogorgon314 closed pull request #14922: [fix][test] Fix clear transaction buffer snapshot flaky test

Posted by GitBox <gi...@apache.org>.
Demogorgon314 closed pull request #14922:
URL: https://github.com/apache/pulsar/pull/14922


   


-- 
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] github-actions[bot] commented on pull request #14922: [fix][test] Fix clear transaction buffer snapshot flaky test

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #14922:
URL: https://github.com/apache/pulsar/pull/14922#issuecomment-1081584323


   @Demogorgon314:Thanks for your contribution. For this PR, do we need to update docs?
   (The [PR template contains info about doc](https://github.com/apache/pulsar/blob/master/.github/PULL_REQUEST_TEMPLATE.md#documentation), which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)


-- 
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] github-actions[bot] commented on pull request #14922: [fix][test] Fix clear transaction buffer snapshot flaky test

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #14922:
URL: https://github.com/apache/pulsar/pull/14922#issuecomment-1081684717


   @Demogorgon314:Thanks for providing doc info!


-- 
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] Demogorgon314 removed a comment on pull request #14922: [fix][test] Fix clear transaction buffer snapshot flaky test

Posted by GitBox <gi...@apache.org>.
Demogorgon314 removed a comment on pull request #14922:
URL: https://github.com/apache/pulsar/pull/14922#issuecomment-1081699284






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