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: adjust OTA test timing #483

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

HIL: adjust OTA test timing #483

wants to merge 2 commits into from

Conversation

szczys
Copy link
Contributor

@szczys szczys commented May 7, 2024

Adjust OTA test timing to reduce tests that fail due to propagation delay.

https://github.com/golioth/firmware-issue-tracker/issues/568

szczys added 2 commits May 7, 2024 11:40
Use semaphores to trigger tests and decrease loop delay from 1000ms to
100ms.

Signed-off-by: Mike Szczys <mike@golioth.io>
When testing reason and state codes, propagation delay from the device to
the server were causing erroneous test failures. This increases the delay
before checking the updated server value, and also increases the device
delay between sending reason/state updates. The marginal difference is 2s
per reason code, or 20 seconds total increase in test time.

Signed-off-by: Mike Szczys <mike@golioth.io>
Copy link

github-actions bot commented May 7, 2024

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

https://golioth-firmware-sdk-doxygen-dev--pr483-szczys-ota-hil-7xfm26tj.web.app

(expires Tue, 14 May 2024 16:46:10 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: a9993e61697a3983f3479e468bcb0b616f9a0578

Copy link

github-actions bot commented May 7, 2024

Code Coverage

Type Coverage
lines 55.2% (1037 of 1878 lines)
functions 57.7% (94 of 163 functions)

@sam-golioth
Copy link
Contributor

Have you seen tests fail at the margins of these timeouts? Or is this more of a guess and check?

@szczys
Copy link
Contributor Author

szczys commented May 7, 2024

More of a guess and check. I have not been able to observe a status update sent to the server fail to update when I check manually so I am guessing that the 1.5s timeout pytest uses from seeing the log message to running the API call is the culprit. I doubled that to 3 seconds and built in some space for that in the C code timing.

I'd prefer not to bank on these timings, but the alternative that comes to mind is introducing an RPC to tell the device to go to the next status. That doesn't seem like a good idea.

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

2 participants