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

hil: ota: use 1 Hz polling for reason and state test #674

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

szczys
Copy link
Contributor

@szczys szczys commented Nov 15, 2024

Use 1 Hz polling in pytest to catch reason and state changes more efficiently.

This removes an arbitrary delay, instead trying multiple times to get the device's reported reason and state codes. On the final timeout, the asserts will always be run so we retain helpful logging messages. This PR also reduces the device delay by 3 seconds, which equates to 30 seconds saved across all reason codes.

Copy link

github-actions bot commented Nov 15, 2024

Visit the preview URL for this PR (updated for commit b8ac3d4):

https://golioth-firmware-sdk-doxygen-dev--pr674-szczys-hil-ota-ey58gdtb.web.app

(expires Mon, 25 Nov 2024 04:26:03 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: a9993e61697a3983f3479e468bcb0b616f9a0578

Use 1 Hz polling in pytest to catch reason and state changes more
efficiently.

Signed-off-by: Mike Szczys <[email protected]>
Copy link

Code Coverage

Code Coverage

Package Line Rate Branch Rate Health
include.golioth 75% 50%
port.linux 53% 28%
port.zephyr 51% 21%
src 69% 31%
Summary 67% (2489 / 3728) 31% (1064 / 3451)

Copy link

codecov bot commented Nov 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

see 1 file with indirect coverage changes

@sam-golioth
Copy link
Contributor

Changes look good! Can we run the test a few times to see how stable it is?

@szczys
Copy link
Contributor Author

szczys commented Nov 18, 2024

Changes look good! Can we run the test a few times to see how stable it is?

I ran the entire suite twice (once with original PR and once last night on a force-push) and it passed both times. I ran the nsim-integration and linux-integration just now and those passed as well.

@szczys szczys merged commit da54812 into main Nov 18, 2024
114 of 126 checks passed
@szczys szczys deleted the szczys/hil-ota-use-polling branch November 18, 2024 20:23
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.

2 participants