test: don't wait for 10000sec. wait 10sec.
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Wed, 11 Oct 2023 07:33:50 +0000 (16:33 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Thu, 12 Oct 2023 01:37:09 +0000 (10:37 +0900)
wait_pipeline_process_buffers accepts timeout in ms, not us.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
tests/nnstreamer_filter_custom/unittest_filter_custom.cc
tests/unittest_util.h

index c7bc3f0..3b52b65 100644 (file)
@@ -129,7 +129,7 @@ TEST (tensorFilterCustom, flexibleInvoke_p)
   sink_received = 0;
   EXPECT_EQ (setPipelineStateSync (gstpipe, GST_STATE_PLAYING, UNITTEST_STATECHANGE_TIMEOUT), 0);
 
-  EXPECT_TRUE (wait_pipeline_process_buffers (&sink_received, 6, TEST_TIMEOUT_LIMIT));
+  EXPECT_TRUE (wait_pipeline_process_buffers (&sink_received, 6, TEST_TIMEOUT_LIMIT_MS));
   g_usleep (1000000);
 
   /** cleanup registered custom_easy filter */
@@ -183,7 +183,7 @@ TEST (tensorFilterCustom, staticFlexibleInvoke_p)
   sink_received = 0;
   EXPECT_EQ (setPipelineStateSync (gstpipe, GST_STATE_PLAYING, UNITTEST_STATECHANGE_TIMEOUT), 0);
 
-  EXPECT_TRUE (wait_pipeline_process_buffers (&sink_received, 6, TEST_TIMEOUT_LIMIT));
+  EXPECT_TRUE (wait_pipeline_process_buffers (&sink_received, 6, TEST_TIMEOUT_LIMIT_MS));
   g_usleep (1000000);
 
   /** cleanup registered custom_easy filter */
index d504d42..96ed8cb 100644 (file)
@@ -31,6 +31,7 @@ extern "C" {
 #define UNITTEST_STATECHANGE_TIMEOUT (2000U)
 #define TEST_DEFAULT_SLEEP_TIME (10000U)
 #define TEST_TIMEOUT_LIMIT (10000000U) /* 10 secs */
+#define TEST_TIMEOUT_LIMIT_MS (10000U) /* 10 secs */
 
 /**
  * @brief Set pipeline state, wait until it's done.