[UTC][notification][Non-ACR][Change applist comparison parameter]
authorseungha.son <seungha.son@samsung.com>
Mon, 7 Nov 2016 07:08:24 +0000 (16:08 +0900)
committerSon seungha <seungha.son@samsung.com>
Sun, 13 Nov 2016 23:20:16 +0000 (15:20 -0800)
Signed-off-by: seungha.son <seungha.son@samsung.com>
Change-Id: If889d444072c98cb34257765f36557768f709fb8

src/utc/notification/utc-notification.c

index fb7eb1f..d64ab1d 100755 (executable)
@@ -3841,15 +3841,27 @@ int utc_notification_get_display_applist_2_p(void)
 {
        int ret = 0;
        int value = 0;
+       int compare_value = NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY | NOTIFICATION_DISPLAY_APP_INDICATOR | NOTIFICATION_DISPLAY_APP_LOCK;
        notification_h notification = NULL;
 
+       /*
+        * Change the comparison parameter from "NOTIFICATION_DISPLAY_APP_ALL"
+        * to "NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY |
+        * NOTIFICATION_DISPLAY_APP_INDICATOR | NOTIFICATION_DISPLAY_APP_LOCK".
+        * Because indicator set the applist except NOTIFICATION_DISPLAY_APP_TICKER.
+        * Also, there is timing issue between notification_update() that be called by indicator
+        * and notification_load_by_tag() that be called by TCT.
+        * So, To solve timing issue, adds sleep(1);
+        */
+       sleep(1);
+
        notification = notification_load_by_tag(TEST_TAG_FOR_NOTI);
 
        assert(notification);
 
        ret = notification_get_display_applist(notification, &value);
 
-       assert_eq(value, NOTIFICATION_DISPLAY_APP_ALL);
+       assert_eq(value, compare_value);
        assert_eq(ret, NOTIFICATION_ERROR_NONE);
 
        notification_free(notification);