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

test_battery_status.py::TestBatteryStatus::test_async_battery_status is very slow #1168

Open
llucax opened this issue Feb 26, 2025 · 0 comments
Labels
part:tests Affects the unit, integration and performance (benchmarks) tests type:tech-debt Improves the project without visible changes for users
Milestone

Comments

@llucax
Copy link
Contributor

llucax commented Feb 26, 2025

What happened?

The test test_battery_status.py::TestBatteryStatus::test_async_battery_status is very slow, it takes about 6 seconds to complete.

What did you expect instead?

The test to run fast.

Affected version(s)

No response

Affected part(s)

Unit, integration and performance tests (part:tests)

Extra information

The problem seems to be in the finalization of either the mock_microgrid or the BatteryStatusTracker, as most of the time is spent in leaving the async with block having those 2.

Time machine is used to speed up the time, but maybe async solipsism isn't and there is something awaiting for some time in the finalization.

@llucax llucax added the type:tech-debt Improves the project without visible changes for users label Feb 26, 2025
@llucax llucax added this to the Untriaged milestone Feb 26, 2025
@keywordlabeler keywordlabeler bot added the part:tests Affects the unit, integration and performance (benchmarks) tests label Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
part:tests Affects the unit, integration and performance (benchmarks) tests type:tech-debt Improves the project without visible changes for users
Projects
Status: To do
Development

No branches or pull requests

1 participant