Skip to content

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

Merged
lhotari merged 1 commit into
apache:masterfrom
summeriiii:fix_test_ml
Oct 13, 2024
Merged

lhotari merged 1 commit into
apache:masterfrom
summeriiii:fix_test_ml

Conversation

@summeriiii

@summeriiii summeriiii commented Oct 11, 2024 •

Copy link
Copy Markdown
Contributor

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

@lhotari lhotari left a comment

Copy link
Copy Markdown
Member

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

codecov-commenter commented Oct 13, 2024 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.29%. Comparing base (bbc6224) to head (3990f7a).
Report is 1181 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

🚀 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 merged commit aa6bc09 into apache:master Oct 13, 2024
@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)
hanmz pushed a commit to hanmz/pulsar that referenced this pull request Feb 12, 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: ManagedLedgerTest.testDeleteCurrentLedgerWhenItIsClosed

3 participants