[Zodb-checkins] CVS: ZODB4/src/zodb/storage/tests - mt.py:1.3
Barry Warsaw
barry@wooz.org
Wed, 22 Jan 2003 15:17:32 -0500
Update of /cvs-repository/ZODB4/src/zodb/storage/tests
In directory cvs.zope.org:/tmp/cvs-serv18634
Modified Files:
mt.py
Log Message:
minor cleanups
=== ZODB4/src/zodb/storage/tests/mt.py 1.2 => 1.3 ===
--- ZODB4/src/zodb/storage/tests/mt.py:1.2 Wed Dec 25 09:12:20 2002
+++ ZODB4/src/zodb/storage/tests/mt.py Wed Jan 22 15:17:30 2003
@@ -1,6 +1,6 @@
##############################################################################
#
-# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# Copyright (c) 2001 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
@@ -11,15 +11,16 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
+
+import time
import random
import threading
-import time
-import zodb.db
from persistence.dict import PersistentDict
from transaction import get_transaction
-from zodb.ztransaction import Transaction
+import zodb.db
+from zodb.ztransaction import Transaction
from zodb.storage.tests.base \
import StorageTestBase, zodb_pickle, zodb_unpickle, handle_serials
from zodb.storage.tests.minpo import MinPO
@@ -32,6 +33,7 @@
l.sort()
return l
+
class ZODBClientThread(threading.Thread):
__super_init = threading.Thread.__init__
@@ -78,6 +80,7 @@
except ConflictError, err:
get_transaction().abort()
+
class StorageClientThread(threading.Thread):
__super_init = threading.Thread.__init__
@@ -132,6 +135,7 @@
revid = handle_serials(oid, r1, r2)
self.oids[oid] = revid
+
class ExtStorageClientThread(StorageClientThread):
def run(self):
@@ -175,6 +179,7 @@
return
for obj in iter:
pass
+
class MTStorage:
"Test a storage with multiple client threads executing concurrently."