[tracker-miners/wip/carlosg/shuffle-libtracker-miner: 32/116] tests: Minor update to TrackerFileNotifier test



commit a710b9759a87558a9496c53b80a4f41433877a4e
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Oct 20 01:11:49 2017 +0200

    tests: Minor update to TrackerFileNotifier test
    
    Because the way the file is created, we will get a create and an update
    here. TrackerMonitor won't merge those together anymore, but
    TrackerMinerFS will, so just acknowledge it's expected in this test.

 tests/libtracker-miner/tracker-file-notifier-test.c | 3 ++-
 tests/libtracker-miner/tracker-monitor-test.c       | 3 +--
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/tests/libtracker-miner/tracker-file-notifier-test.c 
b/tests/libtracker-miner/tracker-file-notifier-test.c
index ea05dcb71..c2737d148 100644
--- a/tests/libtracker-miner/tracker-file-notifier-test.c
+++ b/tests/libtracker-miner/tracker-file-notifier-test.c
@@ -668,7 +668,8 @@ test_file_notifier_monitor_updates_non_recursive (TestCommonContext *fixture,
        };
        FilesystemOperation expected_results2[] = {
                { OPERATION_UPDATE, "non-recursive/bbb", NULL },
-               { OPERATION_CREATE, "non-recursive/ccc", NULL }
+               { OPERATION_CREATE, "non-recursive/ccc", NULL },
+               { OPERATION_UPDATE, "non-recursive/ccc", NULL }
        };
        FilesystemOperation expected_results3[] = {
                { OPERATION_DELETE, "non-recursive/folder", NULL },
diff --git a/tests/libtracker-miner/tracker-monitor-test.c b/tests/libtracker-miner/tracker-monitor-test.c
index 3ba9412d7..2e386931f 100644
--- a/tests/libtracker-miner/tracker-monitor-test.c
+++ b/tests/libtracker-miner/tracker-monitor-test.c
@@ -1495,8 +1495,7 @@ test_monitor_directory_event_moved_to_monitored_after_file_create (TrackerMonito
 
        /* Get events in the file in source dir */
        file_events = GPOINTER_TO_UINT (g_hash_table_lookup (fixture->events, file_in_source_dir));
-       /* Fail if we got ANY signal != CREATED (we created the file while monitoring) */
-       g_assert_cmpuint ((file_events & MONITOR_SIGNAL_ITEM_UPDATED), ==, 0);
+       /* Fail if we got ANY signal != CREATED/UPDATED (we created the file while monitoring) */
        g_assert_cmpuint ((file_events & MONITOR_SIGNAL_ITEM_ATTRIBUTE_UPDATED), ==, 0);
        g_assert_cmpuint ((file_events & MONITOR_SIGNAL_ITEM_DELETED), ==, 0);
        g_assert_cmpuint ((file_events & MONITOR_SIGNAL_ITEM_MOVED_FROM), ==, 0);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]