Commit a8ed7dce authored by 's avatar

- fixed two unit tests that failed on fast Windows machines

parent 273d4d70
...@@ -11,6 +11,8 @@ http://docs.zope.org/zope2/releases/. ...@@ -11,6 +11,8 @@ http://docs.zope.org/zope2/releases/.
Bugs Fixed Bugs Fixed
++++++++++ ++++++++++
- Fixed two unit tests that failed on fast Windows machines.
- Fixed ``testZODBCompat`` tests in ZopeTestCase to match modern ZODB - Fixed ``testZODBCompat`` tests in ZopeTestCase to match modern ZODB
semantics. semantics.
......
...@@ -4,11 +4,11 @@ Zope2.startup() ...@@ -4,11 +4,11 @@ Zope2.startup()
import os import os
import shutil import shutil
import time
import transaction import transaction
import tempfile import tempfile
import ZODB import ZODB
from OFS.Application import Application from OFS.Application import Application
from OFS.History import Historical from OFS.History import Historical
from OFS.SimpleItem import SimpleItem from OFS.SimpleItem import SimpleItem
...@@ -42,10 +42,12 @@ class HistoryTests(unittest.TestCase): ...@@ -42,10 +42,12 @@ class HistoryTests(unittest.TestCase):
t.description = None t.description = None
t.note('Change 1') t.note('Change 1')
t.commit() t.commit()
time.sleep(0.02) # wait at least one Windows clock tick
hi.title = 'Second title' hi.title = 'Second title'
t = transaction.get() t = transaction.get()
t.note('Change 2') t.note('Change 2')
t.commit() t.commit()
time.sleep(0.02) # wait at least one Windows clock tick
hi.title = 'Third title' hi.title = 'Third title'
t = transaction.get() t = transaction.get()
t.note('Change 3') t.note('Change 3')
......
...@@ -255,6 +255,7 @@ class TestCatalogPlan(cleanup.CleanUp, unittest.TestCase): ...@@ -255,6 +255,7 @@ class TestCatalogPlan(cleanup.CleanUp, unittest.TestCase):
plan.stop_split('index1') plan.stop_split('index1')
plan.start_split('sort_on') plan.start_split('sort_on')
plan.stop_split('sort_on') plan.stop_split('sort_on')
time.sleep(0.02) # wait at least one Windows clock tick
plan.stop() plan.stop()
self.assert_(plan.duration > 0) self.assert_(plan.duration > 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment