From 9c4b740e5921d1c4f4fae547733c41fa0bacf851 Mon Sep 17 00:00:00 2001 From: MyungJoo Ham Date: Wed, 7 Feb 2024 16:53:37 +0900 Subject: [PATCH] test/datareposinK: timing error in test case Occasionally, in github-action CI, datareposink.writeFlexibleTensors_n fails due to synchronization errors: ``` [ RUN ] datareposink.writeFlexibleTensors_n ../tests/nnstreamer_datarepo/unittest_datareposink.cc:570: Failure Expected: (file_info) != (nullptr), actual: NULL vs (nullptr) [ FAILED ] datareposink.writeFlexibleTensors_n (173 ms) ``` It happens when the pipeline is set NULL before the file 'flexible.data' is writtn within the pipeline. Allow some time (0.1s) before setting it NULL. Signed-off-by: MyungJoo Ham --- tests/nnstreamer_datarepo/unittest_datareposink.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/nnstreamer_datarepo/unittest_datareposink.cc b/tests/nnstreamer_datarepo/unittest_datareposink.cc index f3bb139..7c7ef4e 100644 --- a/tests/nnstreamer_datarepo/unittest_datareposink.cc +++ b/tests/nnstreamer_datarepo/unittest_datareposink.cc @@ -557,6 +557,7 @@ TEST (datareposink, writeFlexibleTensors_n) setPipelineStateSync (pipeline, GST_STATE_PLAYING, UNITTEST_STATECHANGE_TIMEOUT); g_main_loop_run (loop); + g_usleep (100000); /** wait 0.1 sec before forcing stop */ setPipelineStateSync (pipeline, GST_STATE_NULL, UNITTEST_STATECHANGE_TIMEOUT); gst_object_unref (pipeline); -- 2.7.4