[Zodb-checkins] CVS: Packages/ZEO - testZEO.py:1.9
jeremy@digicool.com
jeremy@digicool.com
Fri, 1 Jun 2001 13:03:28 -0400 (EDT)
Update of /cvs-repository/Packages/ZEO/tests
In directory korak.digicool.com:/tmp/cvs-serv26532
Modified Files:
testZEO.py
Log Message:
Fix checkReconnection().
If an exception is raised, make sure the current transaction is
aborted. And catch more of the oddball exceptions that can get raised
when a server disconnects -- like thread.error.
--- Updated File testZEO.py in package Packages/ZEO --
--- testZEO.py 2001/05/31 02:58:23 1.8
+++ testZEO.py 2001/06/01 17:03:28 1.9
@@ -12,6 +12,7 @@
import ZEO.ClientStorage, ZEO.StorageServer
import ThreadedAsync, ZEO.trigger
from ZODB.FileStorage import FileStorage
+import thread
from ZEO.tests import forker, Cache
from ZEO.smac import Disconnected
@@ -277,7 +278,8 @@
while 1:
try:
revid1 = self._dostore(oid, data=obj)
- except ClientDisconnected:
+ except (ClientDisconnected, thread.error), err:
+ get_transaction().abort()
time.sleep(0.1)
else:
break