[tracker] libtracker-miner tests: CREATED issued on CHANGES_DONE_HINT



commit d3908b63c5c37feb04be88231531f6466ba725f9
Author: Aleksander Morgado <aleksander lanedo com>
Date:   Wed Sep 29 11:01:05 2010 +0200

    libtracker-miner tests: CREATED issued on CHANGES_DONE_HINT
    
     * When a file is CREATED with contents, GIO will issue 3 events:
      CREATED + CHANGED + CHANGES_DONE_HINT. We are now merging all these
      events into a single CREATED event, when CHANGES_DONE_HINT is received.
      This means that we must not get an UPDATED event when we just create
      a file.

 tests/libtracker-miner/tracker-monitor-test.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/tests/libtracker-miner/tracker-monitor-test.c b/tests/libtracker-miner/tracker-monitor-test.c
index b5211a3..e8b6b8b 100644
--- a/tests/libtracker-miner/tracker-monitor-test.c
+++ b/tests/libtracker-miner/tracker-monitor-test.c
@@ -422,11 +422,15 @@ test_monitor_file_event_created (TrackerMonitorTestFixture *fixture,
 	/* Fail if we didn't get the CREATE signal */
 	g_assert_cmpuint ((file_events & MONITOR_SIGNAL_ITEM_CREATED), >, 0);
 
-	/* Fail if we got a MOVE or DELETE signal (update may actually happen) */
+	/* Fail if we got a MOVE or DELETE signal */
 	g_assert_cmpuint ((file_events & MONITOR_SIGNAL_ITEM_MOVED_FROM), ==, 0);
 	g_assert_cmpuint ((file_events & MONITOR_SIGNAL_ITEM_MOVED_TO), ==, 0);
 	g_assert_cmpuint ((file_events & MONITOR_SIGNAL_ITEM_DELETED), ==, 0);
 
+	/* A single CREATED event should now never trigger an UPDATED event */
+	g_assert_cmpuint ((file_events & MONITOR_SIGNAL_ITEM_UPDATED), ==, 0);
+	g_assert_cmpuint ((file_events & MONITOR_SIGNAL_ITEM_ATTRIBUTE_UPDATED), ==, 0);
+
 	/* Cleanup environment */
 	tracker_monitor_set_enabled (fixture->monitor, FALSE);
 



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