diff options
author | Abhishek Kekane <abhishek.kekane@nttdata.com> | 2016-05-23 14:14:11 +0000 |
---|---|---|
committer | Abhishek Kekane <abhishek.kekane@nttdata.com> | 2016-05-23 14:14:55 +0000 |
commit | 7d106c677adf247c37dbc34beae5a446765128a8 (patch) | |
tree | 8278ad7e6f34a4beb20ad26ecb107d0d0f609b78 /glanceclient/tests | |
parent | 9e532db8b0f0ba537edef143a6f5380a2aaa1e4b (diff) | |
download | python-glanceclient-7d106c677adf247c37dbc34beae5a446765128a8.tar.gz |
Revert "Add last_request_id member to HTTPClient and SessionClient"
This reverts commit 9e532db8b0f0ba537edef143a6f5380a2aaa1e4b.
If glanceclient is used in multi-threaded environment, then there is a
possibility of getting invalid/wrong last request-id. To avoid this,
need to use thread local storage to store last-request-id and add
public method to return this request-id to caller.
http://specs.openstack.org/openstack/openstack-specs/specs/return-request-id.html#alternatives
Change-Id: I08d8d87fc0cc291f1b930b2c0cfc110ec8394131
Diffstat (limited to 'glanceclient/tests')
-rw-r--r-- | glanceclient/tests/unit/test_http.py | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/glanceclient/tests/unit/test_http.py b/glanceclient/tests/unit/test_http.py index e0c1219..c18660e 100644 --- a/glanceclient/tests/unit/test_http.py +++ b/glanceclient/tests/unit/test_http.py @@ -200,14 +200,6 @@ class TestClient(testtools.TestCase): resp, body = self.client.get(path, headers=headers) self.assertEqual(text, resp.text) - def test_request_id(self): - path = '/v1/images/detail' - self.mock.get(self.endpoint + path, - headers={"x-openstack-request-id": "req-aaa"}) - - self.client.get(path) - self.assertEqual(self.client.last_request_id, 'req-aaa') - def test_headers_encoding(self): if not hasattr(self.client, 'encode_headers'): self.skipTest('Cannot do header encoding check on SessionClient') |