[tracker] functional-tests: more verbosity on errors. Check the tests let the dirs as expected.
- From: Ivan Frade <ifrade src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] functional-tests: more verbosity on errors. Check the tests let the dirs as expected.
- Date: Wed, 6 Oct 2010 16:57:49 +0000 (UTC)
commit 2e548aac9e5dec2089b13e24ae05e8dfc1b2c93f
Author: Ivan Frade <ivan frade nokia com>
Date: Wed Oct 6 19:12:00 2010 +0300
functional-tests: more verbosity on errors. Check the tests let the dirs as expected.
tests/functional-tests/300-miner-basic-ops.py | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/tests/functional-tests/300-miner-basic-ops.py b/tests/functional-tests/300-miner-basic-ops.py
index aaa0f86..ae458ac 100755
--- a/tests/functional-tests/300-miner-basic-ops.py
+++ b/tests/functional-tests/300-miner-basic-ops.py
@@ -44,6 +44,17 @@ class MinerCrawlTest (CommonTrackerMinerTest):
}
""")
+ def tearDown (self):
+ # Give it a 2 seconds chance
+ result = self.__get_text_documents ()
+ if (len (result) != 3):
+ time.sleep (2)
+ else:
+ return
+
+ result = self.__get_text_documents ()
+ if (len (result) != 3):
+ print "WARNING: Previous test has modified the test files and didn't restore the origina state."
"""
Boot the miner with the correct configuration and check everything is fine
@@ -107,7 +118,7 @@ class MinerCrawlTest (CommonTrackerMinerTest):
time.sleep (1)
# Nothing changed
result = self.__get_text_documents ()
- self.assertEquals (len (result), 3)
+ self.assertEquals (len (result), 3, "Results:" + str(result))
unpacked_result = [ r[0] for r in result]
self.assertIn ( uri ("test-monitored/file1.txt"), unpacked_result)
self.assertIn ( uri ("test-monitored/dir1/file2.txt"), unpacked_result)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]