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

Fix lingering timer in hue light tests #92858

Merged
merged 1 commit into from
May 9, 2023
Merged

Conversation

epenet
Copy link
Contributor

@epenet epenet commented May 9, 2023

Proposed change

Linked to #91360
https://github.com/home-assistant/core/actions/runs/4923668065/jobs/8795822324?pr=91360

ERROR tests/components/hue/test_light_v1.py::test_not_load_groups_if_old_bridge - Failed: Lingering timer after job <Job DataUpdateCoordinator light Mock bridge 1 hue 0d8af528eb721916bdf4ffa192db4dc1 HassJobType.Coroutinefunction <bound method DataUpdateCoordinator._handle_refresh_interval of <homeassistant.helpers.update_coordinator.DataUpdateCoordinator object at 0x7febf017f550>>>
ERROR tests/components/hue/test_light_v1.py::test_no_lights_or_groups - Failed: Lingering timer after job <Job DataUpdateCoordinator group Mock bridge 1 hue 88eed292b0a78ccb326ad420e7fa4d7e HassJobType.Coroutinefunction <bound method DataUpdateCoordinator._handle_refresh_interval of <homeassistant.helpers.update_coordinator.DataUpdateCoordinator object at 0x7febf025cfd0>>>
ERROR tests/components/hue/test_light_v1.py::test_lights - Failed: Lingering timer after job <Job DataUpdateCoordinator group Mock bridge 1 hue b4af73cc02d2b5e395c2c3af3aa1e1ca HassJobType.Coroutinefunction <bound method DataUpdateCoordinator._handle_refresh_interval of <homeassistant.helpers.update_coordinator.DataUpdateCoordinator object at 0x7febf14720b0>>>
ERROR tests/components/hue/test_light_v1.py::test_lights_color_mode - Failed: Lingering timer after test <TimerHandle when=987.829626491 Debouncer._on_debounce() created at /home/runner/work/core/core/homeassistant/helpers/debounce.py:152>
ERROR tests/components/hue/test_light_v1.py::test_groups - Failed: Lingering timer after job <Job DataUpdateCoordinator group Mock bridge 1 hue e59363652a5b40b83042e9689c87ac73 HassJobType.Coroutinefunction <bound method DataUpdateCoordinator._handle_refresh_interval of <homeassistant.helpers.update_coordinator.DataUpdateCoordinator object at 0x7febf04b3b20>>>
ERROR tests/components/hue/test_light_v1.py::test_new_group_discovered - Failed: Lingering timer after test <TimerHandle when=988.1050725059999 Debouncer._on_debounce() created at /home/runner/work/core/core/homeassistant/helpers/debounce.py:152>
ERROR tests/components/hue/test_light_v1.py::test_new_light_discovered - Failed: Lingering timer after test <TimerHandle when=988.2478577539999 Debouncer._on_debounce() created at /home/runner/work/core/core/homeassistant/helpers/debounce.py:152>
ERROR tests/components/hue/test_light_v1.py::test_group_removed - Failed: Lingering timer after test <TimerHandle when=988.389761695 Debouncer._on_debounce() created at /home/runner/work/core/core/homeassistant/helpers/debounce.py:152>
ERROR tests/components/hue/test_light_v1.py::test_light_removed - Failed: Lingering timer after test <TimerHandle when=988.537713285 Debouncer._on_debounce() created at /home/runner/work/core/core/homeassistant/helpers/debounce.py:152>
ERROR tests/components/hue/test_light_v1.py::test_other_group_update - Failed: Lingering timer after test <TimerHandle when=988.6803061319999 Debouncer._on_debounce() created at /home/runner/work/core/core/homeassistant/helpers/debounce.py:152>
ERROR tests/components/hue/test_light_v1.py::test_other_light_update - Failed: Lingering timer after test <TimerHandle when=988.8210239629999 Debouncer._on_debounce() created at /home/runner/work/core/core/homeassistant/helpers/debounce.py:152>
ERROR tests/components/hue/test_light_v1.py::test_light_turn_on_service - Failed: Lingering timer after test <TimerHandle when=989.140704834 Debouncer._on_debounce() created at /home/runner/work/core/core/homeassistant/helpers/debounce.py:152>
ERROR tests/components/hue/test_light_v1.py::test_light_turn_off_service - Failed: Lingering timer after test <TimerHandle when=989.292712256 Debouncer._on_debounce() created at /home/runner/work/core/core/homeassistant/helpers/debounce.py:152>
ERROR tests/components/hue/test_light_v1.py::test_group_features - Failed: Lingering timer after job <Job DataUpdateCoordinator group Mock bridge 1 hue 5c488e09d51a3378a13b0e493ac792ef HassJobType.Coroutinefunction <bound method DataUpdateCoordinator._handle_refresh_interval of <homeassistant.helpers.update_coordinator.DataUpdateCoordinator object at 0x7febf0733520>>>

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

To help with the load of incoming pull requests:

@home-assistant
Copy link

home-assistant bot commented May 9, 2023

Hey there @balloob, @marcelveldt, mind taking a look at this pull request as it has been labeled with an integration (hue) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of hue can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign hue Removes the current integration label and assignees on the pull request, add the integration domain after the command.

@epenet epenet added the smash Indicator this PR is close to finish for merging or closing label May 9, 2023
Comment on lines +182 to +183
config_entry.add_to_hass(hass)
config_entry.state = ConfigEntryState.LOADED
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This ensures that the corresponding config entry is unloaded at the end of the tests.

@epenet epenet merged commit 5f7496f into dev May 9, 2023
@epenet epenet deleted the hue-test-lingering-timers branch May 9, 2023 15:07
@github-actions github-actions bot locked and limited conversation to collaborators May 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bugfix cla-signed code-owner-approved has-tests integration: hue Quality Scale: platinum small-pr PRs with less than 30 lines. smash Indicator this PR is close to finish for merging or closing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants