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

FW query timing test: mock get_data function for timeout #29712

Merged
merged 20 commits into from
Dec 12, 2023

Conversation

jnewb1
Copy link
Contributor

@jnewb1 jnewb1 commented Aug 30, 2023

rather than actually timing out, use a mock function to simulate the timeout to speed up the tests

@sshane any problem with using a mock function there? saves a bit of time in CI and will also be more consistent. it was failing in pytest sometimes: #29709

takes about 30 seconds as is, which makes sense as we run 5x, each with a 6s timeout
30.61s call selfdrive/car/tests/test_fw_fingerprint.py::TestFwFingerprintTiming::test_fw_query_timing

@jnewb1 jnewb1 requested a review from sshane August 30, 2023 07:35
@jnewb1 jnewb1 marked this pull request as ready for review August 30, 2023 07:42
@sshane
Copy link
Contributor

sshane commented Aug 30, 2023

I want to start testing the full fingerprinting stack in openpilot, using commaai/panda#1329, which probably requires the original timeouts. Once I get that merged we look into this?

I think the other test in this file also takes longer.

@jnewb1
Copy link
Contributor Author

jnewb1 commented Aug 30, 2023

I want to start testing the full fingerprinting stack in openpilot, using commaai/panda#1329, which probably requires the original timeouts. Once I get that merged we look into this?

I think the other test in this file also takes longer.

Okay. Test also is inconsistent locally, okay if I bump up the tolerance?

@jnewb1
Copy link
Contributor Author

jnewb1 commented Aug 30, 2023

Closing this until we can test full panda stack

@jnewb1 jnewb1 closed this Aug 30, 2023
@sshane
Copy link
Contributor

sshane commented Aug 30, 2023

The individual brands should be fairly consistent, it's the total time that is easy to deviate from the tolerance.

@adeebshihadeh adeebshihadeh deleted the fw_query_consistent branch August 30, 2023 14:20
@jnewb1 jnewb1 restored the fw_query_consistent branch December 1, 2023 22:34
@jnewb1 jnewb1 reopened this Dec 1, 2023
@github-actions github-actions bot added the car vehicle-specific label Dec 1, 2023
while thread.is_alive():
time.sleep(0.02)
time.sleep(0.001)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you see if the change in timings for OBD multiplexing matches what it is when fingerprinting on device (think going onroad on a desk is enough)?

@sshane sshane changed the title Tests: fw query use a mock function for timeout Tests FW query timing: mock get_data function for timeout Dec 12, 2023
@sshane sshane changed the title Tests FW query timing: mock get_data function for timeout FW query timing test: mock get_data function for timeout Dec 12, 2023
@sshane sshane merged commit 4028cb6 into master Dec 12, 2023
@sshane sshane deleted the fw_query_consistent branch December 12, 2023 03:24
sshane added a commit that referenced this pull request Dec 12, 2023
sshane added a commit that referenced this pull request Dec 12, 2023
…0696)

Revert "FW query timing test: mock get_data function for timeout (#29712)"

This reverts commit 4028cb6.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants