"Error in sys.excepthook" in assertServerFinishesCleanly

Martin Pool mbp at canonical.com
Tue Feb 13 10:39:09 GMT 2007


My merge just failed with:

----------------------------------------------------------------------

Traceback (most recent call last):

  File "/home/pqm/pqm-workdir/home/+trunk/bzrlib/tests/blackbox/test_serve.py", line 112, in test_bzr_serve_port_readonly

    self.assertServerFinishesCleanly(process)

  File "/home/pqm/pqm-workdir/home/+trunk/bzrlib/tests/blackbox/test_serve.py", line 52, in assertServerFinishesCleanly

    self.assertEqual('bzr: interrupted\n', result[1])

AssertionError: 'bzr: interrupted\n' != 'bzr: interrupted\nException in thread smart-server-child (most likely raised during interpreter shutdown):\nTraceback (most recent call last):\n  File "/usr/lib/python2.4/threading.py", line 442, in __bootstrap\n  File "/usr/lib/python2.4/threading.py", line 422, in run\n  File "/home/pqm/pqm-workdir/home/+trunk/bzrlib/transport/smart.py", line 472, in serve\nexceptions.TypeError: \'NoneType\' object is not callable\nUnhandled exception in thread started by \nError in sys.excepthook:\n\nOriginal exception was:\n'

----------------------------------------------------------------------

I think this is the same as
http://www.thescripts.com/forum/thread24261.html
and so there's nothing we can do about it - the vm is collapsing around
the threads.

If that is true then the goal of assertServerFinishesCleanly cannot be
accomplished, and we should just loosen it to something like 


=== modified file 'bzrlib/tests/blackbox/test_serve.py'
--- bzrlib/tests/blackbox/test_serve.py	2006-10-16 01:50:48 +0000
+++ bzrlib/tests/blackbox/test_serve.py	2007-02-13 10:31:28 +0000
@@ -49,7 +49,7 @@
         result = self.finish_bzr_subprocess(process, retcode=3,
                                             send_signal=signal.SIGINT)
         self.assertEqual('', result[0])
-        self.assertEqual('bzr: interrupted\n', result[1])
+        self.assertStartsWith('bzr: interrupted\n', result[1])
 
     def start_server_inet(self, extra_options=()):
         """Start a bzr server subprocess using the --inet option.


 
-- 
Martin



More information about the bazaar mailing list