apache / apache/pulsar-client-cpp
Flaky test: ProducerTest.testWaitForExclusiveProducer
- Dominant language
- C++
- Stars
- 71
- Forks
- 90
- Avg merge
- 2h 33m
- Merged PRs (30d)
- 3
Description
[example failure](https://github.com/apache/pulsar-client-cpp/actions/runs/3589998748/jobs/6042967481)
```
FAILED TESTS (1/376):
166 ms: ./pulsar-tests ProducerTest.testWaitForExclusiveProducer (try #1)
```
```
[ RUN ] ProducerTest.testWaitForExclusiveProducer
2022-12-01 06:25:37.989 INFO [140250769911488] ClientConnection:189 | [ -> pulsar://localhost:6650] Create ClientConnection, timeout=10000
2022-12-01 06:25:37.989 INFO [140250769911488] ConnectionPool:97 | Created connection for pulsar://localhost:6650
2022-12-01 06:25:37.991 INFO [140250766808640] ClientConnection:379 | [[::1]:37744 -> [::1]:6650] Connected to broker
2022-12-01 06:25:37.997 INFO [140250766808640] HandlerBase:72 | [persistent://public/default/testWaitForExclusiveProducer1669875937, p-name-1] Getting connection from pool
2022-12-01 06:25:38.038 INFO [140250766808640] ProducerImpl:190 | [persistent://public/default/testWaitForExclusiveProducer1669875937, p-name-1] Created producer on broker [[::1]:37744 -> [::1]:6650]
2022-12-01 06:25:38.043 INFO [140250769911488] ProducerImpl:721 | [persistent://public/default/testWaitForExclusiveProducer1669875937, p-name-1] Closing producer for topic persistent://public/default/testWaitForExclusiveProducer1669875937
2022-12-01 06:25:38.044 INFO [140250766808640] ProducerImpl:687 | [persistent://public/default/testWaitForExclusiveProducer1669875937, p-name-1] Closed producer 0
2022-12-01 06:25:38.045 INFO [140250766808640] HandlerBase:72 | [persistent://public/default/testWaitForExclusiveProducer1669875937, p-name-2] Getting connection from pool
2022-12-01 06:25:38.053 INFO [140250766808640] ProducerImpl:190 | [persistent://public/default/testWaitForExclusiveProducer1669875937, p-name-2] Created producer on broker [[::1]:37744 -> [::1]:6650]
/home/runner/work/pulsar-client-cpp/pulsar-client-cpp/tests/ProducerTest.cc:331: Failure
Expected equality of these values:
ResultOk
Which is: Ok
producer2.send(MessageBuilder().setContent("content").build())
Which is: ProducerNotInitialized
```
Contributor guide
Research direction
Start with tests/ProducerTest.cc at line 331 and run ProducerTest.testWaitForExclusiveProducer, using the linked CI failure as the baseline. Trace the producer2 initialization and send sequence to determine why the send can observe ProducerNotInitialized. Done means the test passes reliably while preserving the exclusive-producer behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100