Skip to content

[cleanup] Convert 10 test classes to SharedPulsarBaseTest#25338

Open
merlimat wants to merge 9 commits intoapache:masterfrom
merlimat:shared-tests-convert-11a
Open

[cleanup] Convert 10 test classes to SharedPulsarBaseTest#25338
merlimat wants to merge 9 commits intoapache:masterfrom
merlimat:shared-tests-convert-11a

Conversation

@merlimat
Copy link
Contributor

Convert 10 test classes from ProducerConsumerBase to SharedPulsarBaseTest, reducing
test execution time by sharing a single Pulsar cluster across tests.

Also enables brokerDeduplicationEnabled in the shared cluster config (this just allows
the feature; it doesn't enable it for all namespaces).

Converted classes:

  • ClientDeduplicationTest
  • ConsumerDecryptFailListenerTest
  • InterceptorsTest
  • MessageChunkingSharedTest
  • PartialPartitionedProducerTest
  • PartitionedProducerConsumerTest
  • ProducerMemoryLeakTest
  • PulsarMultiHostClientTest
  • RetryTopicTest
  • TopicReaderTest

Documentation

  • doc-not-needed (Changes in your PR don't need doc changes)

Matching PR in forked repository

PR in forked repository:

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Mar 17, 2026
ClientDeduplicationTest, ConsumerDecryptFailListenerTest, InterceptorsTest,
MessageChunkingSharedTest, PartialPartitionedProducerTest,
PartitionedProducerConsumerTest, ProducerMemoryLeakTest,
PulsarMultiHostClientTest, RetryTopicTest, TopicReaderTest
@merlimat merlimat force-pushed the shared-tests-convert-11a branch from 25d5574 to f0e17ce Compare March 19, 2026 04:03
lhotari and others added 4 commits March 19, 2026 13:39
The test asserts exactly 1 ledger remains after trimming, but with
maxEntriesPerLedger=2, if partition-0 receives an even number of
messages, the last ledger is full and a new empty active ledger is
created. The trim correctly removes all consumed ledgers but cannot
remove the ledger containing the last confirmed entry or the current
active ledger, leaving 2 ledgers.

Change the assertion from assertEquals(size, 1) to
assertTrue(size <= 2) since the number of remaining ledgers depends
on whether the last write caused a rollover.
Disable dedup on the namespace to prevent the pulsar.dedup cursor
from blocking ledger trimming. Use skipAllMessages (sync admin call)
instead of acknowledgeCumulative (async) to reliably advance the cursor.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/test 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.

2 participants