The mock third party library was needed for mock support in py2
runtimes. Since we now only support py39 and later, we don't need it
in lower-constraints and requirements.
These changes will help us to drop `mock` from openstack/requirements
Change-Id: I3da40f2d2ef55e4665752450059dddb188414b90
Previously, we would read the whole response into memory, which would
likely cause swift-bench to get killed when using larger objects.
Change-Id: I2b11a3c4ac4690539d3a67fc11a0f5e1777a9b7a
Previously we'd get tracebacks like this during a proxy reload:
Traceback (most recent call last):
File ".../urllib3/connectionpool.py", line 791, in urlopen
response = self._make_request(
File ".../urllib3/connectionpool.py", line 537, in _make_request
response = conn.getresponse()
File ".../urllib3/connection.py", line 461, in getresponse
httplib_response = super().getresponse()
File ".../http/client.py", line 1375, in getresponse
response.begin()
File ".../http/client.py", line 318, in begin
version, status, reason = self._read_status()
File ".../http/client.py", line 287, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ".../requests/adapters.py", line 486, in send
resp = conn.urlopen(
File ".../urllib3/connectionpool.py", line 845, in urlopen
retries = retries.increment(
File ".../urllib3/util/retry.py", line 470, in increment
raise reraise(type(error), error, _stacktrace)
File ".../urllib3/util/util.py", line 38, in reraise
raise value.with_traceback(tb)
File ".../urllib3/connectionpool.py", line 791, in urlopen
response = self._make_request(
File ".../urllib3/connectionpool.py", line 537, in _make_request
response = conn.getresponse()
File ".../urllib3/connection.py", line 461, in getresponse
httplib_response = super().getresponse()
File ".../http/client.py", line 1375, in getresponse
response.begin()
File ".../http/client.py", line 318, in begin
version, status, reason = self._read_status()
File ".../http/client.py", line 287, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ".../eventlet/greenpool.py", line 88, in _spawn_n_impl
func(*args, **kwargs)
File ".../swiftbench/bench.py", line 477, in _run
client.get_object(self.url, self.token,
File ".../swiftclient/client.py", line 1252, in get_object
conn.request(method, path, '', headers)
File ".../swiftclient/client.py", line 416, in request
self.resp = self._request(method, url, headers=headers, data=data,
File ".../swiftclient/client.py", line 400, in _request
return self.request_session.request(*arg, **kwarg)
File ".../requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File ".../requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File ".../requests/adapters.py", line 501, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
Change-Id: Idd1a83afd2c4dbf7305c19d3ec3974961e500620
The test infrastructure for swiftbench is pretty bad. In order to start
cleaning it up this patch starts with some initial scaffolding for
test_cli.py. Sd such it refactors the code out of bin/swiftbench and
puts it into swiftbench/cli/__init__.py. Leaving the cli namespace free
for future expansions.
A very basic tests/test_cli.py has been added which initialises some test
scaffolding. Additionally, fix some bugs this uncovered:
- The --delete-concurrency option now actually has an effect.
- Stop mutating global state on every run.
Partial-Bug: #1263290
Change-Id: Ibb2c3bb17522b6302697e2d2b01df3a6aa62800e
Replace .testr.conf by .stestr.conf for migration and update
.gitignore, tox.ini and test-requirements.txt files accordingly
Signed-off-by: HeroicHitesh <email.hiteshkumar@gmail.com>
Change-Id: I0948bd22e257285c77fb61564684ab31080ecf54
This is a mechanically generated patch to complete step 1 of moving
the zuul job settings out of project-config and into each project
repository.
Because there will be a separate patch on each branch, the branch
specifiers for branch-specific jobs have been removed.
Because this patch is generated by a script, there may be some
cosmetic changes to the layout of the YAML file(s) as the contents are
normalized.
See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html
Change-Id: I3c98411e9ff1840a721933e4fa23f770dc0835d5
Story: #2002586
Task: #24337
The method assertEquals has been deprecated since python 2.7.
http://docs.python.org/2/library/unittest.html#deprecated-aliases
Also in Python 3, a deprecated warning is raised when using assertEquals
therefore we should use assertEqual instead.
This is part of blueprint assertequal
Change-Id: Ie6b881f594c0b3e7015e70a12d7ac720fa765736
Python 3.3/Python 2.6 is not supported from Mitaka, as per Infra.
The following patch removes the support for the same.
Change-Id: I7c8a1a39f0e86cbd38466c2dcd611a8f513c8adc
Closes-Bug: #1526170
As per the comment#12 in [1], the if loop can be removed
and json can be directly imported from bench.py
[1]: https://review.openstack.org/#/c/264486/
TrivialFix
Depends-On:I7c8a1a39f0e86cbd38466c2dcd611a8f513c8adc
Change-Id: I519753b0db0d8eee70c84afa92dfab2b943afbac
To solve the problem of "db type could not be determined" on
py34 we have to run py34 env before py27.
This patch puts py34 first on the tox.ini's list of envs
to avoid this problem to happen.
Change-Id: Ife0c57c0d92d41018862aad744ef9af65ef87b21
Closes-bug: #1489059