[Zodb-checkins]
SVN: ZODB/branches/ctheune-bushy-directory/src/ZODB/tests/blob_transaction.txt
Update getSize tests to reflect current behaviour.
Christian Theune
ct at gocept.com
Thu Jun 26 14:24:40 EDT 2008
Log message for revision 87809:
Update getSize tests to reflect current behaviour.
Changed:
U ZODB/branches/ctheune-bushy-directory/src/ZODB/tests/blob_transaction.txt
-=-
Modified: ZODB/branches/ctheune-bushy-directory/src/ZODB/tests/blob_transaction.txt
===================================================================
--- ZODB/branches/ctheune-bushy-directory/src/ZODB/tests/blob_transaction.txt 2008-06-26 18:03:20 UTC (rev 87808)
+++ ZODB/branches/ctheune-bushy-directory/src/ZODB/tests/blob_transaction.txt 2008-06-26 18:24:40 UTC (rev 87809)
@@ -191,15 +191,15 @@
>>> root4['blob1'].open('r').read()
'this is blob 1woot!this is from connection 3'
-BlobStorages implementation of getSize() includes the blob data and adds it to
-the underlying storages result of getSize(). (We need to ensure the last
+BlobStorages implementation of getSize() does not include the blob data and
+only returns what the underlying storages do. (We need to ensure the last
number to be an int, otherwise it will be a long on 32-bit platforms and an
int on 64-bit)::
>>> underlying_size = base_storage.getSize()
>>> blob_size = blob_storage.getSize()
>>> int(blob_size - underlying_size)
- 91
+ 0
You can't commit a transaction while blob files are open:
@@ -341,21 +341,7 @@
Note: This is a counter measure against regression of bug #126007.
-getSize with garbage in the directory structure
------------------------------------------------
-`getSize` iterates over the existing blob files in the blob directory and adds
-up their size. The blob directory sometimes contains temporary files that the
-getSize function needs to ignore:
-
- >>> garbage_file = os.path.join(blob_dir, 'garbage')
- >>> open(garbage_file, 'w').write('garbage')
- >>> int(blob_storage.getSize())
- 881
-
-
-Note: This is a counter measer against regression of bug #12991.
-
Teardown
--------
More information about the Zodb-checkins
mailing list