Skip to content

Commit

Permalink
test-dds-md-syncer relax timing constraints for intervined callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
OhadMeir committed Jan 16, 2025
1 parent 12d9131 commit 87be9c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions unit-tests/dds/test-md-syncer.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ def md_thread():

def frame_callback( image, metadata ):
on_frame_ready( image, metadata ) # for reporting
sleep( 0.1 )
sleep( 0.2 )
log.d( f'<{image_id(image):->4} {dds.now()} [{threading.get_native_id()}]' )

syncer = new_syncer( on_frame_ready=frame_callback )
Expand All @@ -366,11 +366,11 @@ def frame_thread():
idstr = f'i{image_id(image)}'
log.d( f'{idstr:>5} {dds.now()} [{threadid}] enqueue {image}' )
syncer.enqueue_frame( i, image )
sleep( 0.05 )
sleep( 0.1 )

threadA = threading.Thread( target=frame_thread )
threadA.start()
sleep( 0.12 ) # Between 2nd and 3rd enqueue_frame
sleep( 0.22 ) # Between 2nd and 3rd enqueue_frame
md = new_metadata( 1, time_stamp( 1 ) )
syncer.enqueue_metadata( 1, md )
threadA.join()
Expand Down

0 comments on commit 87be9c2

Please sign in to comment.