Commit a62c62a5 authored by Jim Fulton's avatar Jim Fulton

Added some logic to prevent errors getting blob data

These errors were actually hidden by the test, but were annoying when
debug logging was enabled.
parent 53007b4a
...@@ -94,6 +94,8 @@ Now, let's see if we can break it. :) ...@@ -94,6 +94,8 @@ Now, let's see if we can break it. :)
>>> s2 = db2.storage >>> s2 = db2.storage
>>> start_time = time.time() >>> start_time = time.time()
>>> import os
>>> from ZEO.ClientStorage import _lock_blob
>>> while time.time() - start_time < 999: >>> while time.time() - start_time < 999:
... t = tm2.begin() ... t = tm2.begin()
... if r2[1].v + r2[2].v: ... if r2[1].v + r2[2].v:
...@@ -103,7 +105,10 @@ Now, let's see if we can break it. :) ...@@ -103,7 +105,10 @@ Now, let's see if we can break it. :)
... path = s2.fshelper.getBlobFilename(*blob_id) ... path = s2.fshelper.getBlobFilename(*blob_id)
... if os.path.exists(path): ... if os.path.exists(path):
... ZODB.blob.remove_committed(path) ... ZODB.blob.remove_committed(path)
... s2._call('sendBlob', *blob_id) ... _ = s2.fshelper.createPathForOID(blob_id[0])
... blob_lock = _lock_blob(path)
... s2._call('sendBlob', *blob_id, timeout=9999)
... blob_lock.close()
... else: print('Dang') ... else: print('Dang')
>>> threadf.join() >>> threadf.join()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment