Skip to content

Conversation

@remibettan
Copy link
Contributor

Tracked by: LRS-1257

@remibettan remibettan requested a review from Copilot May 12, 2025 11:04
Copy link

Copilot AI left a 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.

@remibettan remibettan requested a review from Nir-Az May 12, 2025 11:05
import time


def safe_wait_for_frames(pipe, max_retries=10):
Copy link
Collaborator

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.")
Copy link
Collaborator

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?

@Nir-Az Nir-Az self-requested a review May 15, 2025 10:01
@Nir-Az Nir-Az merged commit 5b358cd into IntelRealSense:development May 15, 2025
25 of 26 checks passed
@remibettan remibettan deleted the hdr_long_test_relaxing branch July 29, 2025 14:09
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