Skip to content

[cleanup] Convert 30 test classes to SharedPulsarBaseTest#25381

Merged
merlimat merged 3 commits intoapache:masterfrom
merlimat:shared-tests-convert-38a
Mar 23, 2026
Merged

[cleanup] Convert 30 test classes to SharedPulsarBaseTest#25381
merlimat merged 3 commits intoapache:masterfrom
merlimat:shared-tests-convert-38a

Conversation

@merlimat
Copy link
Copy Markdown
Contributor

@merlimat merlimat commented Mar 21, 2026

Summary

  • Convert 30 test classes from ProducerConsumerBase to SharedPulsarBaseTest
  • Fix flaky tests caused by dedup cursor blocking ledger trimming (disable dedup on namespace for ledger trim tests)
  • Fix AnalyzeBacklogSubscriptionTest config leak (subscriptionBacklogScanMaxEntries not reset between methods)
  • Fix CompactionConcurrencyTest race condition assertion (in-memory metadata too fast for concurrent delete race)
  • Fix SimpleProducerConsumerDisallowAutoCreateTopicTest error message assertion (check exception type instead of message text)

Tests not converted (incompatible with shared cluster):

  • ConnectionHandlerTestgrabCnx() doesn't trigger callback on shared client
  • PersistentTopicProtectedMethodsTest — backlog quota check timing incompatible
  • TopicsConsumerImplTest — partition auto-update 60s interval too long for assertions
  • OrphanPersistentTopicTest — requires Mockito spying on broker service
  • ConsumerCreationTestAutoTopicCreationOverride NPE from config leak
  • ProducerCreationTest — hardcoded public/default namespace throughout
  • EnableReplicatedSubscriptionsIsDisabledTest — requires enableReplicatedSubscriptions=false
  • SubscriptionPauseOnAckStatPersistTest — manual managed ledger open needs more bookies

Documentation

  • doc-not-needed

Matching PR in forked repository

PR in forked repository:


Tip

Add the label ready-to-test to trigger CI

AdminTopicApiTest, AnalyzeBacklogSubscriptionTest,
ClientMetricsTest, CompactionConcurrencyTest,
ConsumerAckTest, ConsumerBatchReceiveTest,
CreateSubscriptionTest,
GetLastMessageIdCompactedTest, LedgerLostAndSkipNonRecoverableTest,
LookupServiceTest, ManagedLedgerConfigTest, MaxProducerTest,
MessageListenerExecutorTest, MockMessageTest, MultiTopicsConsumerTest,
NegativeAcksTest,
PersistentDispatcherMultipleConsumersClassicTest,
PersistentDispatcherMultipleConsumersTest,
PersistentDispatcherSingleActiveConsumerTest,
ProducerBatchSendTest, ProducerConsumerInternalTest,
ProducerReconnectionTest, PulsarBrokerStatsClientTest,
ServerCnxNonInjectionTest, ServiceUrlProviderTest,
SimpleProduceConsumeIoTest,
SimpleProducerConsumerDisallowAutoCreateTopicTest,
SimpleProducerConsumerMLInitializeDelayTest,
SubscriptionStatsTest, TopicSchemaTest
@github-actions
Copy link
Copy Markdown

@merlimat Please add the following content to your PR description and select a checkbox:

- [ ] `doc` <!-- Your PR contains doc changes -->
- [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
- [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
- [ ] `doc-complete` <!-- Docs have been already added -->

@github-actions github-actions bot added doc-not-needed Your PR changes do not impact docs and removed doc-label-missing labels Mar 21, 2026
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.70%. Comparing base (a27988b) to head (2ede9cf).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #25381      +/-   ##
============================================
- Coverage     72.81%   72.70%   -0.11%     
- Complexity    33791    33879      +88     
============================================
  Files          1954     1954              
  Lines        154793   154857      +64     
  Branches      17731    17740       +9     
============================================
- Hits         112716   112596     -120     
- Misses        33066    33213     +147     
- Partials       9011     9048      +37     
Flag Coverage Δ
inttests 25.81% <ø> (-0.10%) ⬇️
systests 22.49% <ø> (-0.09%) ⬇️
unittests 73.67% <ø> (-0.12%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 82 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@merlimat merlimat merged commit 7e5839c into apache:master Mar 23, 2026
53 checks passed
@lhotari lhotari added this to the 4.2.0 milestone Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-not-needed Your PR changes do not impact docs ready-to-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants