[tracker/rss-enclosures] functional-tests: more verbosity on errors. Check the tests let the dirs as expected.



commit 7652ccc257f4191090e185d423bf0b370ce56b0b
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]