[Zope3-checkins] CVS: Zope3/src/zope/testing - functional.py:1.14

Garrett Smith garrett at mojave-corp.com
Wed Aug 13 18:14:04 EDT 2003


Update of /cvs-repository/Zope3/src/zope/testing
In directory cvs.zope.org:/tmp/cvs-serv7065/src/zope/testing

Modified Files:
	functional.py 
Log Message:
Make sure only one connection to the zodb is opened during a test - avoids hang when more than seven calls get getRootFolder() are made.

=== Zope3/src/zope/testing/functional.py 1.13 => 1.14 ===
--- Zope3/src/zope/testing/functional.py:1.13	Fri Aug  1 05:51:05 2003
+++ Zope3/src/zope/testing/functional.py	Wed Aug 13 17:13:58 2003
@@ -121,7 +121,8 @@
 
     def getRootFolder(self):
         """Returns the Zope root folder."""
-        self.connection = self.db.open()
+        if not self.connection:
+            self.connection = self.db.open()
         root = self.connection.root()
         return ContextWrapper(root[ZopePublication.root_name], None)
 




More information about the Zope3-Checkins mailing list