-
Notifications
You must be signed in to change notification settings - Fork 4.9k
safe pipe use in hdr long test #13998
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
safe pipe use in hdr long test #13998
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements safe execution wrappers for pipeline operations in HDR long tests to enhance test robustness by retrying on failure.
- Introduces two functions, safe_wait_for_frames and safe_start_pipe, with retry logic.
- Replaces direct calls to pipe.wait_for_frames() and pipe.start(cfg) with the new safe functions in various test scenarios.
| import time | ||
|
|
||
|
|
||
| def safe_wait_for_frames(pipe, max_retries=10): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets make sure we need it, not sure we do
| return func() | ||
| except Exception as e: | ||
| print(f"Attempt {attempt + 1} failed with exception: {e}") | ||
| print("Failed to execute the function after maximum retries.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not change the 2 prints to log.w and log.e?
Tracked by: LRS-1257