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

Testsuite improvements #1742

Merged
merged 6 commits into from Aug 4, 2021
Merged

Testsuite improvements #1742

merged 6 commits into from Aug 4, 2021

Conversation

matejcik
Copy link
Contributor

Main part is reusing client across test runs, which makes skipping tests significantly faster because we don't have to wait to figure out the model of the device every time.
Locally this speeds up legacy emulator test by 30 seconds, which is nice.

Also makes sure the whole suite always runs against the same device (modulo emulator being restarted).

0deffdb should help with the "invalid chunk size" occasional CI failure, as described in #1668. This is not proven however, we will see in practice.

This makes sure filters are properly cleared when the with-block exits
Makes skipping tests much faster, and running individual tests a tiny
bit faster.

Also makes sure the whole suite always runs against the same device
(modulo emulator being restarted)
… to ping"

This reverts commit ae0da5e.

It seems that there was no good reason for the change in the first
place.
There's two udp calls in `UdpTransport._ping()`:
- socket.sendall(b"PINGPING") -> this will be instanteous, AND it will
raise if the receiving side is not listening.
- socket.recv() -> this will wait for SOCKET_TIMEOUT seconds, but only
in case the sendall() succeeded. This means that receiving side exists
and we are now waiting until it's awake enough to respond.

In conclusion, we avoid hammering emulator with PINGPINGs with a timeout
so short we don't see an answer. This should avoid the problem
occasionally seen in CI and described in #1668
@matejcik matejcik merged commit 0e650b1 into master Aug 4, 2021
@matejcik matejcik deleted the matejcik/testsuite-tweaks branch August 4, 2021 08:59
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.

None yet

1 participant