Skip to content

refactor: cut test execution time #305

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

Merged
merged 10 commits into from
Mar 7, 2024

Conversation

thomasheartman
Copy link
Contributor

@thomasheartman thomasheartman commented Mar 7, 2024

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.

  • Refactor of tests

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

  • Unit tests

Checklist:

  • My code follows the style guidelines of this project
  • 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
  • My changes generate no new warnings
  • 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
  • Any dependent changes have been merged and published in downstream modules

@thomasheartman thomasheartman marked this pull request as ready for review March 7, 2024 10:45
@thomasheartman thomasheartman requested a review from sighphyre March 7, 2024 10:48
@coveralls
Copy link

coveralls commented Mar 7, 2024

Coverage Status

coverage: 97.043% (+0.01%) from 97.031%
when pulling adee672 on refactor/cut-test-execution-time
into 232da69 on main.

Copy link
Member

@sighphyre sighphyre left a comment

Choose a reason for hiding this comment

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

This is fantastic!

@thomasheartman thomasheartman merged commit 254b0d3 into main Mar 7, 2024
@thomasheartman thomasheartman deleted the refactor/cut-test-execution-time branch March 7, 2024 12:00
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