-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: cut test execution time (#305)
This PR decreases test execution time for the test_client test suite by about 2 whole minutes (132 seconds, I think). It does that by extracting the `aggregate_metrics` function and, instead of waiting for the client to actually send metrics, just checking what the metrics would be aggregated to. In doing so, it might be worth adding another test to ensure that metrics **are** actually sent, but we may or may not already have this elsewhere. ## Type of change Please delete options that are not relevant. - [x] Refactor of tests # How Has This Been Tested? Please describe the tests that you ran to verify your changes. - [x] Unit tests # Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [x] Any dependent changes have been merged and published in downstream modules
- Loading branch information
1 parent
232da69
commit 254b0d3
Showing
4 changed files
with
50 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# ruff: noqa: F401 | ||
from .fetch_and_load import fetch_and_load_features | ||
from .send_metrics import aggregate_and_send_metrics | ||
from .send_metrics import aggregate_and_send_metrics, aggregate_metrics |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters