Skip to content

[fix][test] Fix flaky NonPersistentTopicTest.testMsgDropStat #24134

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 28, 2025

Conversation

pdolif
Copy link
Contributor

@pdolif pdolif commented Mar 28, 2025

Fixes #20386

Motivation

It seems that messages are dropped very fast, so the drop stats are already 0 again once we reach the assertion.

Modifications

  • Sleep 10ms after producing a message. With this, the time it takes until all messages are produced is extended. The drop stats are > 0 for a longer time (and at the time when we reach the assertion).
  • Increase the number of threads used for the producer from 5 to 10 to increase concurrency and the probability that messages are dropped.

Verifying this change

  • Make sure that the change passes the CI checks.

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository: pdolif#9

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Mar 28, 2025
Copy link
Member

@lhotari lhotari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codecov-commenter
Copy link

codecov-commenter commented Mar 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.26%. Comparing base (bbc6224) to head (436c26d).
Report is 998 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #24134      +/-   ##
============================================
+ Coverage     73.57%   74.26%   +0.68%     
+ Complexity    32624    32497     -127     
============================================
  Files          1877     1864      -13     
  Lines        139502   144453    +4951     
  Branches      15299    16479    +1180     
============================================
+ Hits         102638   107275    +4637     
+ Misses        28908    28724     -184     
- Partials       7956     8454     +498     
Flag Coverage Δ
inttests 26.76% <ø> (+2.18%) ⬆️
systests 23.14% <ø> (-1.18%) ⬇️
unittests 73.77% <ø> (+0.93%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 1066 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.

@lhotari lhotari added this to the 4.1.0 milestone Mar 28, 2025
@lhotari lhotari merged commit acec48c into apache:master Mar 28, 2025
54 checks passed
@lhotari
Copy link
Member

lhotari commented Mar 28, 2025

Thanks for the contribution @pdolif, good work!

lhotari pushed a commit that referenced this pull request Mar 28, 2025
lhotari pushed a commit that referenced this pull request Mar 28, 2025
nikhil-ctds pushed a commit to datastax/pulsar that referenced this pull request Apr 3, 2025
nikhil-ctds pushed a commit to datastax/pulsar that referenced this pull request Apr 3, 2025
nikhil-ctds pushed a commit to datastax/pulsar that referenced this pull request Apr 8, 2025
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flaky-test: NonPersistentTopicTest.testMsgDropStat
3 participants