[Zodb-checkins] SVN: ZODB/trunk/src/ZEO/tests/zeo_blob_cache.test Fixed a race condition in the function that computes durectory sizes.

Jim Fulton jim at zope.com
Sun Jan 4 18:47:29 EST 2009


Log message for revision 94520:
  Fixed a race condition in the function that computes durectory sizes.
  

Changed:
  U   ZODB/trunk/src/ZEO/tests/zeo_blob_cache.test

-=-
Modified: ZODB/trunk/src/ZEO/tests/zeo_blob_cache.test
===================================================================
--- ZODB/trunk/src/ZEO/tests/zeo_blob_cache.test	2009-01-04 23:46:27 UTC (rev 94519)
+++ ZODB/trunk/src/ZEO/tests/zeo_blob_cache.test	2009-01-04 23:47:29 UTC (rev 94520)
@@ -60,7 +60,11 @@
     ...     for base, dirs, files in os.walk(d):
     ...         for f in files:
     ...             if f.endswith('.blob'):
-    ...                 size += os.stat(os.path.join(base, f)).st_size
+    ...                 try:
+    ...                     size += os.stat(os.path.join(base, f)).st_size
+    ...                 except OSError:
+    ...                      if os.path.exists(os.path.join(base, f)):
+    ...                          raise
     ...     return size
     
     >>> db.storage._check_blob_size_thread.join()



More information about the Zodb-checkins mailing list