[fix][test] Fix flaky NegativeAcksTest.testNegativeAcksWithBackoff
Motivation
This test sometimes blocks at consumer.receive() at line 261. The problem is introduced in this PR https://github.com/apache/pulsar/pull/23986. For batch sending scenarios, the current way of creating producers cannot guarantee that all messages are sent out in one batch. Therefore, for batch messages, executing consumer。negativeAcknowledge only once is not enough.
Modifications
By adding batchingMaxPublishDelay when creating the producer, all messages are guaranteed to be sent together.
Documentation
- [ ]
doc - [ ]
doc-required - [x]
doc-not-needed - [ ]
doc-complete
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 72.74%. Comparing base (bbc6224) to head (e69059f).
:warning: Report is 1271 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #24342 +/- ##
============================================
- Coverage 73.57% 72.74% -0.84%
+ Complexity 32624 32191 -433
============================================
Files 1877 1869 -8
Lines 139502 158700 +19198
Branches 15299 19957 +4658
============================================
+ Hits 102638 115443 +12805
- Misses 28908 33984 +5076
- Partials 7956 9273 +1317
| Flag | Coverage Δ | |
|---|---|---|
| inttests | 28.60% <ø> (+4.02%) |
:arrow_up: |
| systests | 24.81% <ø> (+0.48%) |
:arrow_up: |
| unittests | 72.05% <ø> (-0.79%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more. see 1090 files with indirect coverage changes
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.