zodb-checkins@zope.org
[Top] [All Lists]

[Zodb-checkins] SVN: ZODB/trunk/src/ZEO/tests/zeo_blob_cache.test Fixed

Subject: [Zodb-checkins] SVN: ZODB/trunk/src/ZEO/tests/zeo_blob_cache.test Fixed a race condition in the function that computes durectory sizes.
From: Jim Fulton
Date: Sun, 4 Jan 2009 18:47:29 -0500 EST
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()

_______________________________________________
Zodb-checkins mailing list
Zodb-checkins@xxxxxxxx
http://mail.zope.org/mailman/listinfo/zodb-checkins

<Prev in Thread] Current Thread [Next in Thread>
  • [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 <=