Rev 5257: Use SmartTCPServer_for_testing instead of SmartTCPServer (broken). in file:///home/vila/src/bzr/experimental/leaking-tests/

Vincent Ladeuil v.ladeuil+lp at free.fr
Mon May 31 16:29:23 BST 2010


At file:///home/vila/src/bzr/experimental/leaking-tests/

------------------------------------------------------------
revno: 5257
revision-id: v.ladeuil+lp at free.fr-20100531152923-vcd1va7bz0r5c74b
parent: v.ladeuil+lp at free.fr-20100531135112-3bn7mysnfl086f4g
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: catch-them-all
timestamp: Mon 2010-05-31 17:29:23 +0200
message:
  Use SmartTCPServer_for_testing instead of SmartTCPServer (broken).
-------------- next part --------------
=== modified file 'bzrlib/tests/test_smart_transport.py'
--- a/bzrlib/tests/test_smart_transport.py	2010-05-31 13:51:12 +0000
+++ b/bzrlib/tests/test_smart_transport.py	2010-05-31 15:29:23 +0000
@@ -40,7 +40,10 @@
         server,
         vfs,
 )
-from bzrlib.tests import test_smart
+from bzrlib.tests import (
+    test_server,
+    test_smart,
+    )
 from bzrlib.transport import (
         http,
         local,
@@ -969,7 +972,8 @@
                 return self.base
             def get_bytes(self, path):
                 raise Exception("some random exception from inside server")
-        smart_server = server.SmartTCPServer(backing_transport=FlakyTransport())
+        smart_server = test_server.SmartTCPServer_for_testing(
+            backing_transport=FlakyTransport())
         smart_server.start_background_thread('-' + self.id())
         try:
             transport = remote.RemoteTCPTransport(smart_server.get_url())
@@ -1011,7 +1015,10 @@
             self.real_backing_transport = self.backing_transport
             self.backing_transport = transport.get_transport(
                 "readonly+" + self.backing_transport.abspath('.'))
-        self.server = server.SmartTCPServer(self.backing_transport)
+        self.server = test_server.SmartTCPServer_for_testing(
+            self.backing_transport)
+        # XXX: Shouldn't we calling self.server.start_server below instead of
+        # start_background_thread ? -- vila 20100531
         self.server.start_background_thread('-' + self.id())
         self.transport = remote.RemoteTCPTransport(self.server.get_url())
         self.addCleanup(self.stop_server)



More information about the bazaar-commits mailing list