Commit 2f2192b7 authored by Jim Fulton's avatar Jim Fulton

Changed to work with storages that don't support either versions or undo.

parent faa195cd
...@@ -162,9 +162,25 @@ class ExtStorageClientThread(StorageClientThread): ...@@ -162,9 +162,25 @@ class ExtStorageClientThread(StorageClientThread):
def runtest(self): def runtest(self):
# pick some other storage ops to execute, depending in part # pick some other storage ops to execute, depending in part
# on the features provided by the storage. # on the features provided by the storage.
names = ["do_load", "do_modifiedInVersion"] names = ["do_load"]
if self.storage.supportsUndo():
storage = self.storage
try:
supportsVersions = storage.supportsVersions
except AttributeError:
pass
else:
if supportsVersions():
names.append("do_modifiedInVersion")
try:
supportsUndo = storage.supportsUndo
except AttributeError:
pass
else:
if supportsUndo():
names += ["do_loadSerial", "do_undoLog", "do_iterator"] names += ["do_loadSerial", "do_undoLog", "do_iterator"]
ops = [getattr(self, meth) for meth in names] ops = [getattr(self, meth) for meth in names]
assert ops, "Didn't find an storage ops in %s" % self.storage assert ops, "Didn't find an storage ops in %s" % self.storage
# do a store to guarantee there's at least one oid in self.oids # do a store to guarantee there's at least one oid in self.oids
......
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