lhotari opened a new pull request, #19376:
URL: https://github.com/apache/pulsar/pull/19376
### Motivation
This PR continues changes made in previous PRs (#19337, #19326, #19323) to
refactor Pulsar unit tests to reduce mocking which causes flakiness since
Mockito isn't thread safe.
One key motivation for this PR is to extend PulsarTestContext features so
that most tests can be migrated to use it to reduce the use of Mockito spies in
the way that causes flakiness. Mockito Spies aren't completely removed, but it
moves to a better direction.
There's also a motivation to get rid of using SameThreadOrderedExecutor in
tests that extend MockedPulsarServiceBaseTest . Using this type of executor
could hide real concurrency issues.
### Modifications
- add missing features to PulsarTestContext
- Improve MetadataStoreExtended so that it's simpler to add
MetadataEventSynchronizer in tests
- reduce unnecessary spies for ServiceConfiguration
- migrate tests to use PulsarTestContext
- Disable
FilterEntryTest.testEntryFilterRescheduleMessageDependingOnConsumerSharedSubscription
- this test is very flaky and the behavior depends on the number of
threads in thread pool
- Quarantine a very flaky test
PendingAckPersistentTest.testDeleteUselessLogDataWhenSubCursorMoved
### Documentation
<!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
- [ ] `doc` <!-- Your PR contains doc changes. Please attach the local
preview screenshots (run `sh start.sh` at `pulsar/site2/website`) to your PR
description, or else your PR might not get merged. -->
- [ ] `doc-required` <!-- Your PR changes impact docs and you will update
later -->
- [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
- [ ] `doc-complete` <!-- Docs have been already added -->
### Matching PR in forked repository
PR in forked repository: https://github.com/lhotari/pulsar/pull/139
--
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]