10000 Skip RFXtrx tests unless RFXTRX=RUN by balloob · Pull Request #3625 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Skip RFXtrx tests unless RFXTRX=RUN #3625

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 6 commits into from
Oct 1, 2016
Merged

Skip RFXtrx tests unless RFXTRX=RUN #3625

merged 6 commits into from
Oct 1, 2016

Conversation

balloob
Copy link
Member
@balloob balloob commented Sep 30, 2016

The RFXtrx tests are not successfully cleaning up threads and are slowing down our CI runs. They went from 6 minutes to 35 minutes! Because our CI tests take more time and thus use more resources, Travis is giving us less runs.

For now we'll disable the RFXtrx tests. They can still be run by passing RFXTRX=RUN to py.test:

RFXTRX=RUN py.test

48167ce - This one was still fast
428f8c7 - This one was slow

screen shot 2016-09-30 at 1 02 07 pm

CC @Danielhiversen

@Danielhiversen
Copy link
Member

Why was this line removed?
87fe83d#diff-c7a1a99615d0c3462e591560b1e9c9acL23

I think that is the reason for why rfxtrx no longer is shutting down correctly.

@balloob
Copy link
Member Author
balloob commented Sep 30, 2016

I did that when i was trying to make them faster. Not sure if I should have… My reasoning was that hass.stop() will have it get called https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/rfxtrx.py#L161-L165

@balloob
Copy link
Member Author
balloob commented Oct 1, 2016

@Danielhiversen I am running a test now adding the closed connection and seeing what the impact is.

@balloob
Copy link
Member Author
balloob commented Oct 1, 2016

@Danielhiversen my bad, you were right. I am running it a few more times to gather some more timings.

@Danielhiversen
Copy link
Member

Hmm, why is not _rfxtrx_shutdown() called when when self.hass.stop() is called from the tests? Is not the test_hass executing EVENT_HOMEASSISTANT_STOP when shutting down?

@balloob
Copy link
Member Author
balloob commented Oct 1, 2016

It is sending the STOP event, so that's why I thought it could be removed.

@balloob
Copy link
Member Author
balloob commented Oct 1, 2016

Even with the connection being closed properly, the tests have a significant impact on our test run.

With RFXtrx tests enabled

screen shot 2016-10-01 at 11 32 42
screen shot 2016-10-01 at 11 32 48
screen shot 2016-10-01 at 12 15 38
screen shot 2016-10-01 at 12 15 43

Linting fails in these builds because I didn't remove the import of pytest (used to skip the tests)

With RFXtrx tests disabled

screen shot 2016-10-01 at 13 54 56
screen shot 2016-10-01 at 13 55 02

@balloob balloob force-pushed the skip-rfxtrx-tests branch from d3a83fa to 905d4ca Compare October 1, 2016 19:22
@balloob balloob merged commit 3e24a35 into dev Oct 1, 2016
@balloob balloob deleted the skip-rfxtrx-tests branch October 1, 2016 20:57
@home-assistant home-assistant locked and limited conversation to collaborators Mar 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0