[Zope-Checkins] SVN: Zope/trunk/ - fixed two unit tests that failed on fast Windows machines

Yvo Schubbe y.2010 at wcm-solutions.de
Sun Sep 26 05:34:30 EDT 2010


Log message for revision 116951:
  - fixed two unit tests that failed on fast Windows machines

Changed:
  U   Zope/trunk/doc/CHANGES.rst
  U   Zope/trunk/src/OFS/tests/testHistory.py
  U   Zope/trunk/src/Products/ZCatalog/tests/test_plan.py

-=-
Modified: Zope/trunk/doc/CHANGES.rst
===================================================================
--- Zope/trunk/doc/CHANGES.rst	2010-09-25 22:12:57 UTC (rev 116950)
+++ Zope/trunk/doc/CHANGES.rst	2010-09-26 09:34:29 UTC (rev 116951)
@@ -11,6 +11,8 @@
 Bugs Fixed
 ++++++++++
 
+- Fixed two unit tests that failed on fast Windows machines.
+
 - Fixed ``testZODBCompat`` tests in ZopeTestCase to match modern ZODB
   semantics.
 

Modified: Zope/trunk/src/OFS/tests/testHistory.py
===================================================================
--- Zope/trunk/src/OFS/tests/testHistory.py	2010-09-25 22:12:57 UTC (rev 116950)
+++ Zope/trunk/src/OFS/tests/testHistory.py	2010-09-26 09:34:29 UTC (rev 116951)
@@ -4,11 +4,11 @@
 
 import os
 import shutil
+import time
 import transaction
 import tempfile
 import ZODB
 
-
 from OFS.Application import Application
 from OFS.History import Historical
 from OFS.SimpleItem import SimpleItem
@@ -42,10 +42,12 @@
         t.description = None
         t.note('Change 1')
         t.commit()
+        time.sleep(0.02) # wait at least one Windows clock tick
         hi.title = 'Second title'
         t = transaction.get()
         t.note('Change 2')
         t.commit()
+        time.sleep(0.02) # wait at least one Windows clock tick
         hi.title = 'Third title'
         t = transaction.get()
         t.note('Change 3')

Modified: Zope/trunk/src/Products/ZCatalog/tests/test_plan.py
===================================================================
--- Zope/trunk/src/Products/ZCatalog/tests/test_plan.py	2010-09-25 22:12:57 UTC (rev 116950)
+++ Zope/trunk/src/Products/ZCatalog/tests/test_plan.py	2010-09-26 09:34:29 UTC (rev 116951)
@@ -255,6 +255,7 @@
         plan.stop_split('index1')
         plan.start_split('sort_on')
         plan.stop_split('sort_on')
+        time.sleep(0.02) # wait at least one Windows clock tick
         plan.stop()
 
         self.assert_(plan.duration > 0)



More information about the Zope-Checkins mailing list