Repository navigation
[improve][test] Cut DelayMessagingTest's fixed delays and two setup CLI runs - #27339
Merged
lhotari merged 3 commits intoNov 4, 2026
Merged
Conversation
…LI runs DelayMessagingTest reconsumed its message 11 times with a 5 s delay: 55 s of the job. A 2 s delay still goes through the broker's delayed delivery tracker, which dispatches at once a message that is due within its 1 s tick. Each receive waits up to 10 s, as it did, since a tracked message arrives within a tick of its delivery time. DelayMessagingTest and TestScalableTopicMigration create their namespace and partitioned topic with the admin client rather than pulsar-admin, a JVM start in a broker container each.
11 tasks
lhotari
approved these changes
Nov 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
DelayMessagingTest.delayMsgBlockTestis the slowest method of CI - Integration - Messaging: 60-62 s in thescheduled master runs of 3 Nov, almost all of it fixed delays. It is #10078's regression test for delayed messages
that the broker stopped dispatching after many retries, and it reconsumes its message 11 times with
reconsumeLater(5, SECONDS): 55 s.A shorter delay still goes through the broker's delayed delivery tracker, as long as it is longer than the tracker's
tick (
delayedDeliveryTickTimeMillis, 1 s). WithisDelayedDeliveryDeliverAtTimeStrict=false, the default, thetracker dispatches a message that is due within a tick at once, without tracking it:
DelayMessagingTestandTestScalableTopicMigration(20-22 s) also create their namespace and partitioned topic withpulsar-admin, a JVM start in a broker container each (~1.5 s locally, ~4 s on CI).Modifications
Test code only.
DelayMessagingTest: the delay is 2 s. Eachreceivestill waits up to 10 s, as it did (twice the 5 s delay):a tracked message arrives within a tick of its delivery time, and one that the broker stops dispatching never does.
DelayMessagingTestandTestScalableTopicMigrationcreate their namespace and partitioned topic with the adminclient. The commands that
TestScalableTopicMigrationtests,scalable-topics migrateandget-metadata, stillrun through
pulsar-admin.Verifying this change
This change is covered by the tests it changes.
Local times, on a 10-CPU Docker VM with an image built from apache/master:
DelayMessagingTest.delayMsgBlockTestTestScalableTopicMigration.testMigrateRegularTopicToScalableOn CI, ~35 s and ~8 s less.
The test still catches delayed messages that stop being dispatched. On a broker image whose
AbstractDelayedDeliveryTracker.run(Timeout)returns at once, so that the tracker's timer never triggers a read ofthe messages that are due (patched into the image, not committed):
Consumer can't receive message in double delayTimeSeconds time 10s;Consumer can't receive message in 10s;Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes