Commit 60f8357a authored by Jim Fulton's avatar Jim Fulton

Bugs Fixed

----------

- ZEO server transaction timeouts weren't logged as critical.

https://bugs.launchpad.net/zodb/+bug/670986
parent bffe4694
...@@ -18,6 +18,10 @@ Bugs Fixed ...@@ -18,6 +18,10 @@ Bugs Fixed
See (for example): https://bugs.launchpad.net/zodb/+bug/665452 See (for example): https://bugs.launchpad.net/zodb/+bug/665452
- ZEO server transaction timeouts weren't logged as critical.
https://bugs.launchpad.net/zodb/+bug/670986
3.10.1 (2010-10-27) 3.10.1 (2010-10-27)
=================== ===================
......
...@@ -1337,7 +1337,7 @@ class TimeoutThread(threading.Thread): ...@@ -1337,7 +1337,7 @@ class TimeoutThread(threading.Thread):
if howlong <= 0: if howlong <= 0:
client.log("Transaction timeout after %s seconds" % client.log("Transaction timeout after %s seconds" %
self._timeout, logging.ERROR) self._timeout, logging.CRITICAL)
try: try:
client.connection.call_from_thread(client.connection.close) client.connection.call_from_thread(client.connection.close)
except: except:
......
...@@ -994,6 +994,16 @@ class TimeoutTests(CommonSetupTearDown): ...@@ -994,6 +994,16 @@ class TimeoutTests(CommonSetupTearDown):
storage.tpc_vote(txn) storage.tpc_vote(txn)
time.sleep(2) time.sleep(2)
self.assertRaises(ClientDisconnected, storage.tpc_finish, txn) self.assertRaises(ClientDisconnected, storage.tpc_finish, txn)
# Make sure it's logged as CRITICAL
for line in open("server-%s.log" % self.addr[0][1]):
if (('Transaction timeout after' in line) and
('CRITICAL ZEO.StorageServer' in line)
):
break
else:
self.assert_(False, 'bad logging')
storage.close() storage.close()
def checkTimeoutOnAbort(self): def checkTimeoutOnAbort(self):
......
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