diff options
author | Prashanth Pai <ppai@redhat.com> | 2014-02-10 15:19:20 +0530 |
---|---|---|
committer | Chetan Risbud <crisbud@redhat.com> | 2014-02-10 06:09:14 -0800 |
commit | ad6fb3558019e0f65de0b36c2c2f78d94925838c (patch) | |
tree | bd97267c9f6bc80a63dfe41f8f8be143f8e199a5 /test/functional/swift_test_client.py | |
parent | 3ee9a70402764f21dbea387aa75d81999b224beb (diff) |
Attempt to fix failing testMetadataOnPost functional test
On Jenkins, functional tests occasionally fail in testMetadataOnPost test case
with ResponseNotReady exception. This is an attempt to fix that as I'm
guessing that the following could be the reason.
It is advised to read the whole response body before sending a new request:
http://docs.python.org/2/library/httplib.html#httplib.HTTPConnection.getresponse
http://hg.python.org/cpython/file/2.7/Lib/httplib.py#l1033
Change-Id: I2ee880fd15af8766dcbd12f84ef561a67acdcdce
Signed-off-by: Prashanth Pai <ppai@redhat.com>
Reviewed-on: http://review.gluster.org/6945
Reviewed-by: Chetan Risbud <crisbud@redhat.com>
Tested-by: Chetan Risbud <crisbud@redhat.com>
Diffstat (limited to 'test/functional/swift_test_client.py')
-rw-r--r-- | test/functional/swift_test_client.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/functional/swift_test_client.py b/test/functional/swift_test_client.py index 47e023e..bf101ed 100644 --- a/test/functional/swift_test_client.py +++ b/test/functional/swift_test_client.py @@ -302,6 +302,7 @@ class Connection(object): self.connection.send('0\r\n\r\n') self.response = self.connection.getresponse() + self.response.read() self.connection.close() return self.response.status |