[tracker-miners/wip/carlosg/shuffle-libtracker-miner: 70/116] tests: Ignore previous monitor events from test setup
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/wip/carlosg/shuffle-libtracker-miner: 70/116] tests: Ignore previous monitor events from test setup
- Date: Sat, 14 Dec 2019 16:20:41 +0000 (UTC)
commit 83e0c832db2abf90b790096b825cd3caa35167b0
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Aug 16 00:19:02 2018 +0200
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
tests/libtracker-miner/tracker-monitor-test.c | 4 ++++
1 file changed, 4 insertions(+)
---
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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]