Skip to content

[fix][test] Reduce flakiness of AdminApi2Test - #20529

Merged
lhotari merged 2 commits into
apache:masterfrom
lhotari:lh-fix-flaky-AdminApi2Test
Jun 7, 2023
Merged

lhotari merged 2 commits into
apache:masterfrom
lhotari:lh-fix-flaky-AdminApi2Test

Conversation

@lhotari

@lhotari lhotari commented Jun 7, 2023 •

Copy link
Copy Markdown
Member

Fixes #20376

Motivation

AdminApi2Test is extremely flaky and causes most builds to fail.

Modifications

  • calling resetConfig method between test methods is the wrong solution since it creates a new instance and the running broker will keep using the old instance
    • reset properties on the existing conf instance
  • use unique tenants and namespaces to make it easier to track where the possibly conflicting topics were created, if the problems preserve
  • add a better solution for resetting state between test methods when it is needed
  • catch exceptions in deletion and restart the cluster in the case of exceptions
    • this will handle the flakiness with resetClusters.
    • The tradeoff is that it could hide some problems that the flakiness is revealing.

Documentation

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

@lhotari lhotari added this to the 3.1.0 milestone Jun 7, 2023
@lhotari lhotari self-assigned this Jun 7, 2023
@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Jun 7, 2023
@lhotari

lhotari commented Jun 7, 2023

Copy link
Copy Markdown
Member Author

/pulsarbot rerun-failure-checks

@eolivelli eolivelli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1

Also this test class is very big, maybe it would be worth splitting it into smaller classes

- calling resetConfig method between test methods is the wrong solution
- use unique tenants and namespaces to make it easier to track where
  the possibly conflicting topics were created, if the problems
  preserve
@lhotari
lhotari force-pushed the lh-fix-flaky-AdminApi2Test branch from faf1d9a to 81eb7d0 Compare June 7, 2023 14:02
@lhotari

lhotari commented Jun 7, 2023

Copy link
Copy Markdown
Member Author

Also this test class is very big, maybe it would be worth splitting it into smaller classes

+1

@codecov-commenter

codecov-commenter commented Jun 7, 2023 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.90%. Comparing base (d7186a6) to head (089a84b).
⚠️ Report is 1924 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #20529      +/-   ##
============================================
- Coverage     72.93%   72.90%   -0.04%     
+ Complexity    31930    31820     -110     
============================================
  Files          1867     1867              
  Lines        138555   138554       -1     
  Branches      15218    15218              
============================================
- Hits         101059   101015      -44     
- Misses        29466    29522      +56     
+ Partials       8030     8017      -13     
Flag Coverage Δ
inttests 24.20% <ø> (-0.04%) ⬇️
systests 24.91% <ø> (+0.01%) ⬆️
unittests 72.19% <ø> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 77 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 60dba5d into apache:master Jun 7, 2023
lhotari added a commit that referenced this pull request Jun 7, 2023
@merlimat merlimat mentioned this pull request Oct 23, 2026
1 of 2 tasks
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: AdminApi2Test.resetClusters

4 participants