-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
Fix flaky tests in advantage_air #129758
Fix flaky tests in advantage_air #129758
Conversation
Hey there @Bre77, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
I'll take a look for the root cause soon. There must be some sort of race condition. |
Yes - I think I have resolved the issue now: patching the reload timeout means that it reloads more quickly, before the next update triggers. I think this is the correct way of resolving the race condition. |
await hass.async_block_till_done(wait_background_tasks=True) | ||
assert len(mock_get.mock_calls) == 3 | ||
|
||
with patch("homeassistant.config_entries.RELOAD_AFTER_UPDATE_DELAY", 1): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Patching RELOAD_AFTER_UPDATE_DELAY
isn't great, but its an existing issue
I am reworking the tests because this whole reload business is redundant given we can test with |
Breaking change
Proposed change
#129735 reduced the occurrences, but it is still flaky
There must be a better way to resolve this - but I couldn't work one out...I believe it is now resolved.
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: