Skip to content
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

[fix][test] Fix flaky test ManagedLedgerTest.testDeleteCurrentLedgerWhenItIsClosed #23437

Merged
merged 1 commit into from
Oct 13, 2024

Conversation

summeriiii
Copy link
Contributor

@summeriiii summeriiii commented Oct 11, 2024

Fixes #23164

Motivation

The previous current ledger can only be deleted if the new ledger is created.
When param closeLedgerByAddEntry is true, there may exist the situation: when call internalTrimEdgers to delete previous current ledger, new ledger has not been created, and causing the test failed.

Modifications

Whether closeLedgerByAddEntry is true or false, we both need to add Awaitility.await().untilAsserted(() -> assertEquals(ml.ledgers.size(), 2)); to wait the new ledger create.

Documentation

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

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 Oct 11, 2024
@summeriiii summeriiii marked this pull request as draft October 11, 2024 11:12
@summeriiii summeriiii marked this pull request as ready for review October 12, 2024 03:35
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

@lhotari lhotari added this to the 4.1.0 milestone Oct 12, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.29%. Comparing base (bbc6224) to head (3990f7a).
Report is 667 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #23437      +/-   ##
============================================
+ Coverage     73.57%   74.29%   +0.71%     
- Complexity    32624    34446    +1822     
============================================
  Files          1877     1953      +76     
  Lines        139502   147177    +7675     
  Branches      15299    16204     +905     
============================================
+ Hits         102638   109339    +6701     
- Misses        28908    29394     +486     
- Partials       7956     8444     +488     
Flag Coverage Δ
inttests 27.56% <ø> (+2.98%) ⬆️
systests 24.36% <ø> (+0.04%) ⬆️
unittests 73.64% <ø> (+0.79%) ⬆️

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

see 633 files with indirect coverage changes

@lhotari lhotari merged commit aa6bc09 into apache:master Oct 13, 2024
62 checks passed
@lhotari lhotari modified the milestones: 4.1.0, 4.0.0 Oct 14, 2024
lhotari pushed a commit that referenced this pull request Oct 14, 2024
lhotari pushed a commit that referenced this pull request Oct 14, 2024
nikhil-ctds pushed a commit to datastax/pulsar that referenced this pull request Oct 15, 2024
…henItIsClosed (apache#23437)

(cherry picked from commit aa6bc09)
(cherry picked from commit 40f83aa)
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Oct 16, 2024
…henItIsClosed (apache#23437)

(cherry picked from commit aa6bc09)
(cherry picked from commit 40f83aa)
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: ManagedLedgerTest.testDeleteCurrentLedgerWhenItIsClosed
3 participants