Skip to content

Add tests for the dispatcherMaxRoundRobinBatchSize config #24094

Closed
@BewareMyPower

Description

@BewareMyPower

Search before asking

  • I searched in the issues and found nothing similar.

Motivation

This config limits the max number of entries to dispatch for a Shared or Key_Shared subscription. However, there is no related test, so a regression could be introduced.

See

private int dispatcherMaxRoundRobinBatchSize = 20;

I added a TODO here:

// TODO: add tests to verify dispatcherMaxRoundRobinBatchSize is respected

If this line was changed like:

            int maxEntriesInThisBatch =
                            // use the average batch size per message to calculate the number of entries to
                            // dispatch. round up to the next integer without using floating point arithmetic.
                            (maxMessagesInThisBatch + avgBatchSizePerMsg - 1) / avgBatchSizePerMsg);

no tests will fail. This is dangerous because there is no test that guarantees the config works

Solution

No response

Alternatives

No response

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

Labels

good first issueGood for newcomerstype/enhancementThe enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions