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/04/22 08:46:58 UTC

[GitHub] [pulsar] BewareMyPower opened a new pull request, #15271: [C++] Remove the flaky and meaningless tests

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

   Fixes #13849
   Fixes #14848
   
   ### Motivation
   
   #11570 adds a `testSendAsyncCloseAsyncConcurrentlyWithLazyProducers` for
   the case that some `sendAsync` calls that are invoked after `closeAsync`
   is called in another thread must complete with `ResultAlreadyClosed`.
   It's flaky because the synchronization between two threads is not
   strict. This test uses `sendStartLatch` for the order of `sendAsync` and
   `closeAsync`:
   
   ```
   sendAsync 0,1,...,9 -> sendStartLatch is done -> closeAsync
   ```
   
   However, it cannot guarantee the rest `sendAsync` calls happen after
   `closeAsync` is called. If so, all `sendAsync` calls will complete with
   `ResultOk`.
   
   On the other hand, this test is meaningless because it requires strict
   synchronization between two threads so there is no need to run
   `sendAsync` and `closeAsync` in two threads.
   
   The verification of this test is also wrong, see
   https://github.com/apache/pulsar/issues/13849#issuecomment-1079098248.
   When `closeAsync` is called, the previous `sendAsync` calls might not
   complete, so all `sendAsync` will complete with `ResultAlreadyClosed`,
   not only those called after `closeAsync`.
   
   In addition, this PR also tries to fix the flaky `testReferenceCount`,
   which assumes too strictly.
   
   ### Modifications
   
   - Remove `testSendAsyncCloseAsyncConcurrentlyWithLazyProducers`
   - Only check the reference count is greater than 0 instead of equal to 1
   
   ### Documentation
   
   Check the box below or label this PR directly.
   
   Need to update docs? 
   
   - [ ] `doc-required` 
   (Your PR needs to update docs and you will update later)
     
   - [x] `no-need-doc` 
   It only fixes the flaky tests.
     
   - [ ] `doc` 
   (Your PR contains doc changes)
   
   - [ ] `doc-added`
   (Docs have been already added)


-- 
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] lhotari commented on pull request #15271: [C++] Remove the flaky and meaningless tests

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

   /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] BewareMyPower merged pull request #15271: [C++] Remove the flaky and meaningless tests

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


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