Rev 5563: Remove the test, it's not reliable and served its purpose: check the raised exception. in file:///home/vila/src/bzr/bugs/686008-spurious-https-failure/

Vincent Ladeuil v.ladeuil+lp at free.fr
Tue Dec 7 16:21:51 GMT 2010


At file:///home/vila/src/bzr/bugs/686008-spurious-https-failure/

------------------------------------------------------------
revno: 5563
revision-id: v.ladeuil+lp at free.fr-20101207162150-he0c4rh42q17inxu
parent: v.ladeuil+lp at free.fr-20101207162043-4hwdb21xa2o4ufv7
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 686008-spurious-https-failure
timestamp: Tue 2010-12-07 17:21:50 +0100
message:
  Remove the test, it's not reliable and served its purpose: check the raised exception.
-------------- next part --------------
=== modified file 'bzrlib/tests/test_http.py'
--- a/bzrlib/tests/test_http.py	2010-12-07 16:18:50 +0000
+++ b/bzrlib/tests/test_http.py	2010-12-07 16:21:50 +0000
@@ -2216,38 +2216,3 @@
         self.assertEqual('', stdout.getvalue())
 
 
-class TestBug686008(tests.TestCase):
-
-    _test_needs_features = [tests.HTTPSServerFeature]
-
-    def test_it(self):
-        from bzrlib.tests import https_server
-        import ssl
-        trigger_bug = False
-        class RequestHandler(http_server.TestingHTTPRequestHandler):
-
-            def handle_one_request(self):
-                if trigger_bug:
-                    # Now, break the ssl socket
-                    sock = socket.socket(socket.AF_INET)
-                    self.connection = ssl.wrap_socket(sock)
-                    self.rfile = self.connection.makefile('rb', self.rbufsize)
-                http_server.TestingHTTPRequestHandler.handle_one_request(self)
-
-            def do_HEAD(self):
-                # Always succeds, leaving the connection open
-                self.close_connection = 0
-                self.send_response(200)
-                self.end_headers()
-
-        server = https_server.HTTPSServer(RequestHandler)
-        self.start_server(server)
-        self.assertIsInstance(server.server,
-                              https_server.TestingThreadingHTTPSServer)
-        t = _urllib.HttpTransport_urllib(server.get_url())
-        self.addCleanup(t.disconnect)
-        # We need a first clean request
-        t.has('foo')
-        # Now we force the server to choke
-        trigger_bug = True
-        server.stop_server()



More information about the bazaar-commits mailing list