Skip to content

safe pipe use in hdr long test - #13998

Merged
Nir-Az merged 3 commits into
realsenseai:developmentfrom
remibettan:hdr_long_test_relaxing
May 15, 2025
Merged

Nir-Az merged 3 commits into
realsenseai:developmentfrom
remibettan:hdr_long_test_relaxing

Conversation

@remibettan

Copy link
Copy Markdown
Contributor

Tracked by: LRS-1257

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread unit-tests/live/d400/test-hdr-long.py Resolved
@remibettan
remibettan requested a review from Nir-Az May 12, 2025 11:05
Comment thread unit-tests/live/d400/test-hdr-long.py Outdated
import time


def safe_wait_for_frames(pipe, max_retries=10):

Copy link
Copy Markdown
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

Comment thread unit-tests/live/d400/test-hdr-long.py Resolved
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
Copy Markdown
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 realsenseai:development May 15, 2025
@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.

3 participants