Rev 6179: more debugging bits. in http://bazaar.launchpad.net/~jameinel/bzr/2.5-hanging-tests

John Arbash Meinel john at arbash-meinel.com
Fri Sep 30 11:55:56 UTC 2011


At http://bazaar.launchpad.net/~jameinel/bzr/2.5-hanging-tests

------------------------------------------------------------
revno: 6179
revision-id: john at arbash-meinel.com-20110930115530-dstr9ifovjzczkqq
parent: john at arbash-meinel.com-20110930112935-yn2im56bv7y3a9n9
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.5-hanging-tests
timestamp: Fri 2011-09-30 13:55:30 +0200
message:
  more debugging bits.
-------------- next part --------------
=== modified file 'bzrlib/remote.py'
--- a/bzrlib/remote.py	2011-09-29 15:09:07 +0000
+++ b/bzrlib/remote.py	2011-09-30 11:55:30 +0000
@@ -2097,7 +2097,6 @@
                 response = client.call_with_body_stream(
                     (verb, path, '') + lock_args, byte_stream)
             except errors.UnknownSmartMethod, e:
-                import pdb; pdb.set_trace()
                 medium._remember_remote_is_before(required_version)
             else:
                 found_verb = True

=== modified file 'bzrlib/smart/message.py'
--- a/bzrlib/smart/message.py	2011-09-29 15:09:07 +0000
+++ b/bzrlib/smart/message.py	2011-09-30 11:55:30 +0000
@@ -16,6 +16,7 @@
 
 import collections
 from cStringIO import StringIO
+import time
 
 from bzrlib import (
     debug,
@@ -302,7 +303,7 @@
         if 'hpss' in debug.debug_flags:
             mutter('   result:   %r', self.args)
         if self.status == 'E':
-            import pdb; pdb.set_trace()
+            time.sleep(0.5)
             self._wait_for_response_end()
             _raise_smart_server_error(self.args)
         return tuple(self.args)

=== modified file 'bzrlib/tests/per_interrepository/test_fetch.py'
--- a/bzrlib/tests/per_interrepository/test_fetch.py	2011-09-29 15:09:07 +0000
+++ b/bzrlib/tests/per_interrepository/test_fetch.py	2011-09-30 11:55:30 +0000
@@ -16,6 +16,7 @@
 
 
 import sys
+_real_stderr = sys.stderr
 
 from bzrlib import (
     errors,
@@ -214,6 +215,7 @@
         trunk.repository.fetch(branch.repository, 'left')
         trunk.repository.fetch(branch.repository, 'right')
         repo = self.make_to_repository('stacked')
+        _real_stderr.write('Calling make_to_repository("stacked")\n')
         stacked_branch = repo.bzrdir.create_branch()
         stacked_branch.set_stacked_on_url(trunk.base)
         stacked_branch.repository.fetch(branch.repository, 'merge')

=== modified file 'bzrlib/tests/test_server.py'
--- a/bzrlib/tests/test_server.py	2011-09-30 11:29:35 +0000
+++ b/bzrlib/tests/test_server.py	2011-09-30 11:55:30 +0000
@@ -19,11 +19,13 @@
 import SocketServer
 import sys
 import threading
+import traceback
 
 
 from bzrlib import (
     cethread,
     osutils,
+    trace,
     transport,
     urlutils,
     )
@@ -314,6 +316,9 @@
                 trace.mutter('Got an exception: %s' % (sys.exc_info()))
                 self.handle_error(request, client_address)
                 self.close_request(request)
+        else:
+            trace.mutter('Got a request from %s, but we\'re already stopping'
+                         % (client_address,))
 
     def get_request(self):
         return self.socket.accept()
@@ -328,6 +333,8 @@
         return self.serving
 
     def handle_error(self, request, client_address):
+        trace.mutter('Got handle_error for request: %s'
+                     % (request, client_address))
         # Stop serving and re-raise the last exception seen
         self.serving = False
         # The following can be used for debugging purposes, it will display the
@@ -533,6 +540,8 @@
     def stop_server(self):
         if self.server is None:
             return
+        trace.mutter('stop_server called %s, shutting down:\n%s'
+                     % (self, traceback.format_stack()))
         try:
             # The server has been started successfully, shut it down now.  As
             # soon as we stop serving, no more connection are accepted except



More information about the bazaar-commits mailing list