Skip to content

LAN integration test base for wemo/harman/sonos - #3320

Open
cjswedes wants to merge 1 commit into
hue-lan-integration-tests-reviewfrom
lan-integration-tests-wemo-sonos-harman
Open

cjswedes wants to merge 1 commit into
hue-lan-integration-tests-reviewfrom
lan-integration-tests-wemo-sonos-harman

Conversation

@cjswedes

Copy link
Copy Markdown
Contributor

This was done as a part of the review for the LAN integration test framework which is not yet released.

A few things that would be helpful that each driver agent hand rolled:

  • Helper for the step from create to added: Takes create metadata and returns the mock device after building it, and registering it with the framework. It would optionally queue added/init events
  • Log wrapping to catch "Failed to invoke capability command handler" is needed by every test not just hue, so it should be a part of the framework with an ability to opt out
  • First class time control: Add test.let_time_pass(seconds), and something like test.advance_to_next_timer(). That way a test can say "the reply comes 4 s after the search" without polling os.time() with max_turns = 500. Also clarify how wait_until's time jumps interact with cosock.socket.sleep and with driver:call_with_delay/call_on_schedule (the old mock_timer_channel).

These are just suggestions for things that would allow for easier writing of tests that will need to be done for all lan drivers

This was done as a part of the review for the LAN integration test
framework which is not yet released.

A few things that would be helpful that each driver agent hand rolled:
- Helper for the step from create to added: Takes create metadata and
  returns the mock device after building it, and registering it with the
  framework. It would optionally queue added/init events
- Log wrapping to catch "Failed to invoke capability command handler" is
  needed by every test not just hue, so it should be a part of the
  framework with an ability to opt out
- First class time control: Add test.let_time_pass(seconds), and something
  like test.advance_to_next_timer(). That way a test can say "the reply
  comes 4 s after the search" without polling os.time() with max_turns = 500.
  Also clarify how wait_until's time jumps interact with cosock.socket.sleep
  and with driver:call_with_delay/call_on_schedule (the old mock_timer_channel).

These are just suggestions for things that would allow for easier
writing of tests that will need to be done for all lan drivers
@github-actions

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

Test Results

0 files   -    73  0 suites   - 563   0s ⏱️ ±0s
0 tests  - 3 323  0 ✅  - 3 304  0 💤 ±0  0 ❌ ±0 
0 runs   - 5 316  0 ✅  - 5 297  0 💤 ±0  0 ❌ ±0 

Results for commit e6637ad. ± Comparison against base commit 711ea58.

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.

1 participant