summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInki Dae <inki.dae@samsung.com>2024-01-25 15:29:10 +0900
committerInki Dae <inki.dae@samsung.com>2024-01-25 15:29:10 +0900
commit00e5e9f39af46ede8e4d9edb7577167f2123db18 (patch)
treee78bd1d6b08dce563f8ad66317642f6aec6d4dcf
parented29ef391c5390313d532cfad96614bc5e88950b (diff)
downloadmediavision-00e5e9f39af46ede8e4d9edb7577167f2123db18.tar.gz
mediavision-00e5e9f39af46ede8e4d9edb7577167f2123db18.tar.bz2
mediavision-00e5e9f39af46ede8e4d9edb7577167f2123db18.zip
test: fix test case for object detection task group
[issue type] : bug fix Fix test case for object detection task group. In case of using async API, destroy API can be called prior to exiting from waitforOutputQueue function of AsyncManager class, and it can return a invalid operation exception. Therefore, make sure to check the invalid operation exception so that test case can be existed from user thread loop correctly. Change-Id: I654a7123d6c88f40e6a17e55c2e374ff6c685017 Signed-off-by: Inki Dae <inki.dae@samsung.com>
-rw-r--r--test/testsuites/machine_learning/object_detection/test_object_detection_async.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/testsuites/machine_learning/object_detection/test_object_detection_async.cpp b/test/testsuites/machine_learning/object_detection/test_object_detection_async.cpp
index 9cda1fcf..1b772161 100644
--- a/test/testsuites/machine_learning/object_detection/test_object_detection_async.cpp
+++ b/test/testsuites/machine_learning/object_detection/test_object_detection_async.cpp
@@ -53,6 +53,9 @@ void object_detection_callback(void *user_data)
unsigned int number_of_objects;
int ret = mv_object_detection_get_result_count(handle, &number_of_objects);
+ if (ret == MEDIA_VISION_ERROR_INVALID_OPERATION)
+ break;
+
ASSERT_EQ(ret, MEDIA_VISION_ERROR_NONE);
for (unsigned int idx = 0; idx < number_of_objects; ++idx) {
@@ -206,6 +209,9 @@ void face_detection_callback(void *user_data)
unsigned int number_of_objects;
int ret = mv_face_detection_get_result_count(handle, &number_of_objects);
+ if (ret == MEDIA_VISION_ERROR_INVALID_OPERATION)
+ break;
+
ASSERT_EQ(ret, MEDIA_VISION_ERROR_NONE);
for (unsigned int idx = 0; idx < number_of_objects; ++idx) {