summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2018-08-16 00:19:02 +0200
committerCarlos Garnacho <carlosg@gnome.org>2018-08-16 00:33:36 +0200
commitff1f66a4d46b672f0cfd7ef26ea52841dc2a8ab7 (patch)
tree2dd509127c5fc99cbd7a1ce7104a7d88d2db34a9
parent130f06737268237d801ca7040e5894efba73630d (diff)
downloadtracker-ff1f66a4d46b672f0cfd7ef26ea52841dc2a8ab7.tar.gz
tests: Ignore previous monitor events from test setup
This specific TrackerMonitor test sometimes fails on an unexpected sequence of monitor events. Give it time to handle all events after the test is set up, those are not the purpose of the test, and handling all them in one go sometimes results on another series of roughly equivalent events. Closes: #20
-rw-r--r--tests/libtracker-miner/tracker-monitor-test.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/libtracker-miner/tracker-monitor-test.c b/tests/libtracker-miner/tracker-monitor-test.c
index 828ce7cbb..89f29b244 100644
--- a/tests/libtracker-miner/tracker-monitor-test.c
+++ b/tests/libtracker-miner/tracker-monitor-test.c
@@ -1001,6 +1001,10 @@ test_monitor_directory_event_moved_to_monitored_after_file_create (TrackerMonito
/* Add some file to the new dir, WHILE ALREADY MONITORING */
set_file_contents (source_path, "lalala.txt", "whatever", &file_in_source_dir);
+ /* Ignore the events thus far */
+ events_wait (fixture);
+ g_hash_table_remove_all (fixture->events);
+
/* Get final path of the file */
file_in_dest_dir_path = g_build_path (G_DIR_SEPARATOR_S,
fixture->monitored_directory,