[tracker/sam/functional-test-fixes: 8/30] functional-tests: Wait for resources correctly in writebacktest base class
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/sam/functional-test-fixes: 8/30] functional-tests: Wait for resources correctly in writebacktest base class
- Date: Thu, 21 Aug 2014 22:12:48 +0000 (UTC)
commit 1d963edd8b066a25b9b5f7a6e1f74f4aadd4a5bd
Author: Sam Thursfield <sam afuera me uk>
Date: Mon Jul 21 21:56:58 2014 +0100
functional-tests: Wait for resources correctly in writebacktest base class
Avoid using miner_fs_wait_for_idle(), use await_resource_inserted().
.../functional-tests/common/utils/writebacktest.py | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/tests/functional-tests/common/utils/writebacktest.py
b/tests/functional-tests/common/utils/writebacktest.py
index 3701226..df02252 100644
--- a/tests/functional-tests/common/utils/writebacktest.py
+++ b/tests/functional-tests/common/utils/writebacktest.py
@@ -88,8 +88,10 @@ class CommonTrackerWritebackTest (ut.TestCase):
self.system = TrackerSystemAbstraction ()
self.system.tracker_writeback_testing_start (CONF_OPTIONS)
- log ("Waiting for miner to be idle")
- self.system.tracker_miner_fs_wait_for_idle()
+
+ self.system.store.await_resource_inserted('nfo:Image', self.get_test_filename_jpeg())
+ self.system.store.await_resource_inserted('nfo:Image', self.get_test_filename_tiff())
+ self.system.store.await_resource_inserted('nfo:Image', self.get_test_filename_png())
# Returns when ready
log ("Ready to go!")
@@ -99,13 +101,16 @@ class CommonTrackerWritebackTest (ut.TestCase):
self.system.tracker_writeback_testing_stop ()
- def get_test_filename_jpeg (self):
+ @staticmethod
+ def get_test_filename_jpeg ():
return uri (TEST_FILE_JPEG)
- def get_test_filename_tiff (self):
+ @staticmethod
+ def get_test_filename_tiff ():
return uri (TEST_FILE_TIFF)
- def get_test_filename_png (self):
+ @staticmethod
+ def get_test_filename_png ():
return uri (TEST_FILE_PNG)
def get_mtime (self, filename):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]