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

add metadata-syncer unit-tests #11695

Merged
merged 9 commits into from
Apr 19, 2023
Merged

add metadata-syncer unit-tests #11695

merged 9 commits into from
Apr 19, 2023

Conversation

maloel
Copy link
Collaborator

@maloel maloel commented Apr 18, 2023

Also:

  • removed rspy.ac (leftover from old auto calibration in libci)
  • saw an abnormal start of rspy.test.remote - try to improve the handling and waiting

@maloel maloel requested a review from OhadMeir April 18, 2023 09:35
test.check_equal( last_metadata, None )
test.check_equal( len(dropped_metadata), 0 )
syncer.enqueue_metadata( 2, new_metadata( 2 ) )
test.check( last_image ) and test.check_equal( image_id( last_image ), 2 )
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add a counter in on_frame_ready and check that both frames were handled

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We could record the frames that were received in on_frame_ready... I'll see if I can add.

on_frame_ready( image, metadata )
id = image_id( image ) + 1
syncer.enqueue_frame( id, new_image( id ))
# Can generate a 'RuntimeError: device or resource busy' and then the 2nd frame won't come out
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this comment still relevant? What does it mean seeing this error, should we just try again?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not relevant any more -- will remove or clarify it's what may happen if it's not working right...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Now:

# Above used to generate a 'RuntimeError: device or resource busy' so the 2nd frame didn't
# come out - that's what we're testing: the syncer shouldn't be locked inside the callback!

Copy link
Contributor

@OhadMeir OhadMeir left a comment

Choose a reason for hiding this comment

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

LGTM

@maloel maloel merged commit dc71ae3 into IntelRealSense:dds Apr 19, 2023
@maloel maloel deleted the timestamp branch April 19, 2023 09:47
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