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

only initialize all the variables once to speed up test ConsumeMessageConcurrentlyServiceTest #8436

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

TestBoost
Copy link
Contributor

Which Issue(s) This PR Fixes

We are not fixing existing issues in this commit.

Brief Description

Changes proposed in this pull request:

We put all the initialization of the mocks and variables into the method body of @BeforeAll and @afterall. There are two tests in the test class ConsumeMessageConcurrentlyServiceTest. However, these two tests are not affecting each other.
The test runtime can jump from 2.771 s to 1.768 s after applying the changes when run on our machine.

How Did You Test This Change?

We just ran this test class in any order and it passes. We ran this test class 10 times and it also passes. We also ran all tests in client module 10 times, and there are no changes for the test results.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 45.48%. Comparing base (6fb455a) to head (604b60b).

Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #8436      +/-   ##
=============================================
- Coverage      45.54%   45.48%   -0.06%     
+ Complexity     11031    11020      -11     
=============================================
  Files           1274     1274              
  Lines          88997    88997              
  Branches       11440    11440              
=============================================
- Hits           40532    40481      -51     
- Misses         43427    43467      +40     
- Partials        5038     5049      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@RongtongJin RongtongJin merged commit 2ed4ba2 into apache:develop Aug 1, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants