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

[improve] [test] Remove redudant test code #21999

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

thetumbled
Copy link
Member

@thetumbled thetumbled commented Jan 31, 2024

Motivation

The logic of these three methods testHealthCheckup, testHealthCheckupV1, testHealthCheckupV2 are same except the TopicVersion variable, we can introduce a @DataProvider to replace them.

Modifications

introduce

    @DataProvider(name = "topicVersion")
    public static Object[][] topicVersions() {
        return new Object[][] {
                { null },
                { TopicVersion.V1 },
                { TopicVersion.V2 },
        };
    }

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

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: thetumbled#40

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Jan 31, 2024
@thetumbled
Copy link
Member Author

thetumbled commented Jan 31, 2024

PTAL, thanks. @lhotari @poorbarcode @codelipenghui @mattisonchao

@Technoboy- Technoboy- changed the title [improve] [test] remove redudant test code [improve] [test] Remove redudant test code Jan 31, 2024
@thetumbled
Copy link
Member Author

/pulsarbot rerun-failure-checks

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (fce0717) 72.90% compared to head (6563b45) 73.61%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #21999      +/-   ##
============================================
+ Coverage     72.90%   73.61%   +0.71%     
- Complexity    32464    32479      +15     
============================================
  Files          1850     1863      +13     
  Lines        138611   138812     +201     
  Branches      15201    15215      +14     
============================================
+ Hits         101052   102191    +1139     
+ Misses        29711    28724     -987     
- Partials       7848     7897      +49     
Flag Coverage Δ
inttests 24.05% <ø> (?)
systests 23.93% <ø> (?)
unittests 72.90% <ø> (+<0.01%) ⬆️

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

see 195 files with indirect coverage changes

@Technoboy- Technoboy- merged commit a702e5a into apache:master Jan 31, 2024
54 of 56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/test doc-not-needed Your PR changes do not impact docs ready-to-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants