[CalendarServer-changes] [12689] CalendarServer/trunk/txweb2

source_changes at macosforge.org source_changes at macosforge.org
Wed Mar 12 11:21:21 PDT 2014


Revision: 12689
          http://trac.calendarserver.org//changeset/12689
Author:   cdaboo at apple.com
Date:     2014-02-13 14:14:57 -0800 (Thu, 13 Feb 2014)
Log Message:
-----------
Fix intermittent test failure.

Modified Paths:
--------------
    CalendarServer/trunk/txweb2/dav/test/test_pipeline.py
    CalendarServer/trunk/txweb2/dav/test/tworequest_client.py
    CalendarServer/trunk/txweb2/test/test_http.py

Modified: CalendarServer/trunk/txweb2/dav/test/test_pipeline.py
===================================================================
--- CalendarServer/trunk/txweb2/dav/test/test_pipeline.py	2014-02-13 19:51:17 UTC (rev 12688)
+++ CalendarServer/trunk/txweb2/dav/test/test_pipeline.py	2014-02-13 22:14:57 UTC (rev 12689)
@@ -75,6 +75,5 @@
                                                            env=os.environ))
         yield d
         out, err, code = d.getResult()
-        print err
         self.assertEquals(code, 0, "Error output:\n%s" % (err,))
         self.assertEquals(out, "HTTP/1.1 403 Forbidden\r\nContent-Length: 0\r\n\r\nHTTP/1.1 403 Forbidden\r\nContent-Length: 0\r\n\r\n")

Modified: CalendarServer/trunk/txweb2/dav/test/tworequest_client.py
===================================================================
--- CalendarServer/trunk/txweb2/dav/test/tworequest_client.py	2014-02-13 19:51:17 UTC (rev 12688)
+++ CalendarServer/trunk/txweb2/dav/test/tworequest_client.py	2014-02-13 22:14:57 UTC (rev 12689)
@@ -1,6 +1,5 @@
 import socket
 import sys
-import time
 
 test_type = sys.argv[1]
 port = int(sys.argv[2])
@@ -18,25 +17,25 @@
     send = s.send
     recv = s.recv
 
-print >> sys.stderr, "\n>> Making %s request to port %d" % (socket_type, port)
+print >> sys.stderr, ">> Making %s request to port %d" % (socket_type, port)
 
 send("PUT /forbidden HTTP/1.1\r\n")
 send("Host: localhost\r\n")
 
-print >> sys.stderr, ">> Sending lots of data: t={}".format(time.time())
+print >> sys.stderr, ">> Sending lots of data"
 send("Content-Length: 100\r\n\r\n")
 send("X" * 100)
 
 send("PUT /forbidden HTTP/1.1\r\n")
 send("Host: localhost\r\n")
 
-print >> sys.stderr, ">> Sending lots of data: t={}".format(time.time())
+print >> sys.stderr, ">> Sending lots of data"
 send("Content-Length: 100\r\n\r\n")
 send("X" * 100)
 
 #import time
 #time.sleep(5)
-print >> sys.stderr, ">> Getting data: t={}".format(time.time())
+print >> sys.stderr, ">> Getting data"
 data = ''
 while len(data) < 299999:
     try:
@@ -46,5 +45,4 @@
     if x == '':
         break
     data += x
-print >> sys.stderr, ">> Done data: t={}".format(time.time())
 sys.stdout.write(data)

Modified: CalendarServer/trunk/txweb2/test/test_http.py
===================================================================
--- CalendarServer/trunk/txweb2/test/test_http.py	2014-02-13 19:51:17 UTC (rev 12688)
+++ CalendarServer/trunk/txweb2/test/test_http.py	2014-02-13 22:14:57 UTC (rev 12689)
@@ -1258,6 +1258,7 @@
 class SSLServerTest(unittest.TestCase, AbstractServerTestMixin):
     type = 'ssl'
     def setUp(self):
+        HTTPChannel.allowPersistentConnections = True
         sCTX = ssl.DefaultOpenSSLContextFactory(certPath, certPath)
         factory=SimpleFactory(requestFactory=SimpleRequest)
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140312/8f8b0ee8/attachment.html>


More information about the calendarserver-changes mailing list