BewareMyPower opened a new issue, #58:
URL: https://github.com/apache/pulsar-client-cpp/issues/58

   ### Search before asking
   
   - [X] I searched in the 
[issues](https://github.com/apache/pulsar-client-cpp/issues) and found nothing 
similar.
   
   
   ### Version
   
   master after #54
   
   ### Minimal reproduce step
   
   Run `ShutdownTest` in parallel
   
   ```bash
   python3 ./gtest_parallel.py 
--dump_json_test_results=/tmp/gtest_parallel_results.json \
     --workers=4 --retry_failed=2 -d /tmp \
     ./tests/pulsar-tests --gtest_filter='*ShutdownTest*'
   ```
   
   
   
   ### What did you expect to see?
   
   All tests passed.
   
   ### What did you see instead?
   
   ```
   FAILED TESTS (8/6):
        192 ms: ./tests/pulsar-tests Pulsar/ShutdownTest.testDestructor/1 (try 
#1)
        190 ms: ./tests/pulsar-tests Pulsar/ShutdownTest.testDestructor/2 (try 
#1)
        190 ms: ./tests/pulsar-tests Pulsar/ShutdownTest.testClose/2 (try #1)
        129 ms: ./tests/pulsar-tests Pulsar/ShutdownTest.testDestructor/2 (try 
#2)
        128 ms: ./tests/pulsar-tests Pulsar/ShutdownTest.testClose/2 (try #2)
        134 ms: ./tests/pulsar-tests Pulsar/ShutdownTest.testDestructor/1 (try 
#2)
        106 ms: ./tests/pulsar-tests Pulsar/ShutdownTest.testDestructor/2 (try 
#3)
        117 ms: ./tests/pulsar-tests Pulsar/ShutdownTest.testClose/2 (try #3)
   ```
   
   ### Anything else?
   
   It's because gtest-parallel runs tests in different **processes**, not 
threads. So the topic name could be the same even if it has the timestamp 
suffix. We can see it from the logs:
   
   ```
   2022-10-21 10:42:06.749 ERROR [140341161174784] MultiTopicsConsumerImpl:449 
| Closing the consumer failed for partition - 
persistent://public/default/shutdown-test-0-1666320126-partition-0 with error - 
AlreadyClosed
   2022-10-21 10:42:06.849 ERROR [140219768280832] MultiTopicsConsumerImpl:449 
| Closing the consumer failed for partition - 
persistent://public/default/shutdown-test-0-1666320126-partition-1 with error - 
AlreadyClosed
   ```
   
   ### Are you willing to submit a PR?
   
   - [X] I'm willing to submit a PR!


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to