[Zope-Checkins] CVS: Zope/lib/python/ZEO/tests - InvalidationTests.py:1.4.4.4

Jeremy Hylton jeremy at zope.com
Mon Mar 22 11:57:03 EST 2004


Update of /cvs-repository/Zope/lib/python/ZEO/tests
In directory cvs.zope.org:/tmp/cvs-serv22261

Modified Files:
      Tag: Zope-2_7-branch
	InvalidationTests.py 
Log Message:
Potential fixes.


=== Zope/lib/python/ZEO/tests/InvalidationTests.py 1.4.4.3 => 1.4.4.4 ===
--- Zope/lib/python/ZEO/tests/InvalidationTests.py:1.4.4.3	Mon Mar  8 11:56:56 2004
+++ Zope/lib/python/ZEO/tests/InvalidationTests.py	Mon Mar 22 11:57:02 2004
@@ -409,8 +409,9 @@
         t2 = self.StressThread(self, db2, stop, 2, cd, 2)
         self.go(stop, cd, t1, t2)
 
-        db1._storage.sync()
-        db2._storage.sync()
+        while storage1.lastTransaction() != storage2.lastTransaction():
+            db1._storage.sync()
+            db2._storage.sync()
 
         cn = db1.open()
         tree = cn.root()["tree"]
@@ -447,8 +448,9 @@
 
     def checkConcurrentUpdates2StoragesMT(self):
         self._storage = storage1 = self.openClientStorage()
+        storage2 = self.openClientStorage()
         db1 = DB(storage1)
-        db2 = DB(self.openClientStorage())
+        db2 = DB(storage2)
         stop = threading.Event()
 
         cn = db1.open()
@@ -467,8 +469,9 @@
         t3 = self.StressThread(self, db2, stop, 3, cd, 3, 3, 0.01)
         self.go(stop, cd, t1, t2, t3)
 
-        db1._storage.sync()
-        db2._storage.sync()
+        while storage1.lastTransaction() != storage2.lastTransaction():
+            db1._storage.sync()
+            db2._storage.sync()
 
         cn = db1.open()
         tree = cn.root()["tree"]
@@ -481,8 +484,9 @@
 
     def checkConcurrentUpdatesInVersions(self):
         self._storage = storage1 = self.openClientStorage()
+        storage2 = self.openClientStorage()
         db1 = DB(storage1)
-        db2 = DB(self.openClientStorage())
+        db2 = DB(storage2)
         stop = threading.Event()
 
         cn = db1.open()
@@ -501,8 +505,9 @@
         t3 = VersionStressThread(self, db2, stop, 3, cd, 3, 3, 0.01)
         self.go(stop, cd, t1, t2, t3)
 
-        db1._storage.sync()
-        db2._storage.sync()
+        while storage1.lastTransaction() != storage2.lastTransaction():
+            db1._storage.sync()
+            db2._storage.sync()
 
         cn = db1.open()
         tree = cn.root()["tree"]
@@ -516,8 +521,9 @@
     def checkConcurrentLargeUpdates(self):
         # Use 3 threads like the 2StorageMT test above.
         self._storage = storage1 = self.openClientStorage()
+        storage2 = self.openClientStorage()
         db1 = DB(storage1)
-        db2 = DB(self.openClientStorage())
+        db2 = DB(storage2)
         stop = threading.Event()
 
         cn = db1.open()
@@ -538,9 +544,13 @@
         t3 = LargeUpdatesThread(self, db2, stop, 3, cd, 3, 3, 0.01)
         self.go(stop, cd, t1, t2, t3)
 
+        # XXX THese two never seem to get in sync.
+##        while storage1.lastTransaction() != storage2.lastTransaction():
+##            db1._storage.sync()
+##            db2._storage.sync()
         db1._storage.sync()
         db2._storage.sync()
-
+ 
         cn = db1.open()
         tree = cn.root()["tree"]
         self._check_tree(cn, tree)




More information about the Zope-Checkins mailing list