Skip to content

Commit

Permalink
[TEST/ml-service] Wait until recevive the message
Browse files Browse the repository at this point in the history
Wait until recevie the message within timeout.

Signed-off-by: gichan2-jang <gichan2.jang@samsung.com>
  • Loading branch information
gichan-jang authored and jaeyun-jung committed May 27, 2024
1 parent 2aae0b4 commit 4ddbb60
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/capi/unittest_capi_service_offloading.cc
Original file line number Diff line number Diff line change
Expand Up @@ -619,8 +619,10 @@ TEST_F (MLOffloadingService, launchPipeline)
status = waitPipelineStateChange (handle, ML_PIPELINE_STATE_PLAYING, 200);
EXPECT_EQ (status, ML_ERROR_NONE);

/* Give enough time for frames to flow. */
g_usleep (1000000);
guint tried = 0;
do {
g_usleep (500000U);
} while (sink_received < 1 && tried++ < 10);

EXPECT_GT (received, 0);
EXPECT_GT (sink_received, 0);
Expand Down

0 comments on commit 4ddbb60

Please sign in to comment.