[Zope-CVS] CVS: Products/AdaptableStorage/tests - testZope2FS.py:1.2
Shane Hathaway
shane@zope.com
Tue, 3 Dec 2002 18:10:56 -0500
Update of /cvs-repository/Products/AdaptableStorage/tests
In directory cvs.zope.org:/tmp/cvs-serv22143/tests
Modified Files:
testZope2FS.py
Log Message:
Running AdaptableStorage with the latest Zope revealed some flaws.
Fixed them all.
- Consistent ordering of transaction participants now makes it impossible to
add a jar to the transaction after the commit() method has begun.
AdaptableStorage (and perhaps other projects like ZPatterns) relied on
the ability to add a jar after commit has started. This could lead to
a deadlock. Reworked ASStorage, FSConnection, and the tests to deal with
this.
- Serials are now required to be hashable. This makes serials, used to
prevent conflicts, simpler and more robust.
- DBTab needs some kind of class it can call directly, so I added
the small subclasses FSStorage and FSDatabase to Zope2FS.
- Restored the PersistentExtra patch.
- The directory items gateway wants to write data about its children, but
sometimes its children aren't being written at the same time. Added
a "conditional" optional flag to FSConnection.writeSection(), allowing
data to be written only if other data gets written.
=== Products/AdaptableStorage/tests/testZope2FS.py 1.1 => 1.2 ===
--- Products/AdaptableStorage/tests/testZope2FS.py:1.1 Wed Nov 27 13:37:08 2002
+++ Products/AdaptableStorage/tests/testZope2FS.py Tue Dec 3 18:10:54 2002
@@ -36,10 +36,10 @@
path = mktemp()
os.mkdir(path)
self.path = path
- dm = createDomainMapper(path)
+ dm, fs_conn = createDomainMapper(path)
self.dm = dm
resource = StaticResource(dm)
- storage = ASStorage(resource)
+ storage = ASStorage(resource, [fs_conn])
self.storage = storage
db = ASDB(storage, resource)
self.db = db