nrwt is failing to upload test results on the chromium-mac-leopard bots
authordpranke@chromium.org <dpranke@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 Apr 2012 21:07:42 +0000 (21:07 +0000)
committerdpranke@chromium.org <dpranke@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 Apr 2012 21:07:42 +0000 (21:07 +0000)
https://bugs.webkit.org/show_bug.cgi?id=83230

Unreviewed, build fix.

It looks like the change in r113399 to use the per-request
timeout variable didn't actually work, so I am removing the
timeout code altogether and counting on the idea that upload
just isn't likely to take that long and the timeouts and
retransmits are largely unused and largely unnecessary. We'll
see if this breaks anywhere else.

* Scripts/webkitpy/common/net/file_uploader.py:
(FileUploader.__init__):
(FileUploader._upload_data.callback):
(FileUploader):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113617 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/webkitpy/common/net/file_uploader.py

index 86f389b..90f1c96 100644 (file)
@@ -1,3 +1,22 @@
+2012-04-09  Dirk Pranke  <dpranke@chromium.org>
+
+        nrwt is failing to upload test results on the chromium-mac-leopard bots
+        https://bugs.webkit.org/show_bug.cgi?id=83230
+
+        Unreviewed, build fix.
+
+        It looks like the change in r113399 to use the per-request
+        timeout variable didn't actually work, so I am removing the
+        timeout code altogether and counting on the idea that upload
+        just isn't likely to take that long and the timeouts and
+        retransmits are largely unused and largely unnecessary. We'll
+        see if this breaks anywhere else.
+
+        * Scripts/webkitpy/common/net/file_uploader.py:
+        (FileUploader.__init__):
+        (FileUploader._upload_data.callback):
+        (FileUploader):
+
 2012-04-09  Rob Buis  <rbuis@rim.com>
 
         [BlackBerry] Cleanup LayoutTestControllerBlackBerry.cpp
index fa8345e..9b220b0 100644 (file)
@@ -84,7 +84,6 @@ class FileUploader(object):
     def __init__(self, url, timeout_seconds):
         self._url = url
         self._timeout_seconds = timeout_seconds
-        self._deadline = time.time() + self._timeout_seconds
 
     def upload_single_text_file(self, filesystem, content_type, filename):
         return self._upload_data(content_type, filesystem.read_text_file(filename))
@@ -100,11 +99,10 @@ class FileUploader(object):
 
     def _upload_data(self, content_type, data):
         def callback():
-            now = time.time()
-            if now > self._deadline:
-                # This shouldn't happen, but just to be safe ...
-                raise NetworkTimeout()
+            # FIXME: Setting a timeout, either globally using socket.setdefaulttimeout()
+            # or in urlopen(), doesn't appear to work on Mac 10.5 with Python 2.7.
+            # For now we will ignore the timeout value and hope for the best.
             request = urllib2.Request(self._url, data, {"Content-Type": content_type})
-            return urllib2.urlopen(request, timeout=(self._deadline - now))
+            return urllib2.urlopen(request)
 
         return NetworkTransaction(timeout_seconds=self._timeout_seconds).run(callback)