Skip to content

add metadata-syncer unit-tests - #11695

Merged
maloel merged 9 commits into
realsenseai:ddsfrom
maloel:timestamp
Apr 19, 2023
Merged

add metadata-syncer unit-tests#11695
maloel merged 9 commits into
realsenseai:ddsfrom
maloel:timestamp

Conversation

@maloel

@maloel maloel commented Apr 18, 2023

Copy link
Copy Markdown
Contributor

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
Comment thread unit-tests/dds/test-metadata-syncer.py Outdated
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
Copy Markdown
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
Copy Markdown
Contributor 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.

Comment thread unit-tests/dds/test-metadata-syncer.py Outdated
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
Copy Markdown
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
Copy Markdown
Contributor 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
Copy Markdown
Contributor 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!

@OhadMeir OhadMeir 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.

LGTM

@maloel
maloel merged commit dc71ae3 into realsenseai: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