RETIRED, Part of OpenStack's Oslo project. New Oslo APIs go through an incubation phase in this repository before being released as part of a proper Python library.
![]() ServiceRestartTest.test_terminate_sigterm would often fail in my Jenkins
instance. It turns out that sometimes the test case would manage to send
its SIGTERM after the signal handler is put in place, but before we
enter the "try: except" block in _wait_for_exit_or_signal. This meant
that the SignalExit exception isn't caught and makes the process
terminate with non-zero exit code. To verify this, you can add a
time.sleep(3) right after self.handle_signal().
To avoid this race condition, we add a ready_callback argument to
Service.wait() that gets called when entering the try-catch block.
In the test, we pass an Event object and wait for it to be set before
proceeding. This also gets rid of the questionable call to "ps".
This patch uses the port 9001 instead of 9000 for the test_pool test. It
looks like something is running on the 9000 port on the gate and is
preventing this test to succeed. This test, as the others in this test
suite, are meant to test the server live, hence the listen method is not
being mocked out.
This test doesn't exist on master anymore, so this is a stable/havana
thing only. Also, this change can't be done in a separate patch because
it depends on the change done in `test_service` to succeed.
Change-Id: I598e8bc889b6c2627a62271627d17b44e01acbe4
(cherry picked from commit
|
||
---|---|---|
contrib | ||
doc/source | ||
etc/oslo | ||
openstack | ||
pypi | ||
tests | ||
tools | ||
.coveragerc | ||
.gitignore | ||
.gitreview | ||
.mailmap | ||
.testr.conf | ||
HACKING.rst | ||
LICENSE | ||
MAINTAINERS | ||
MANIFEST.in | ||
README.rst | ||
TESTING.rst | ||
requirements.txt | ||
run_tests.sh | ||
setup.cfg | ||
setup.py | ||
test-requirements.txt | ||
tox.ini | ||
update.py | ||
update.sh |
README.rst
The Oslo Incubator
The Oslo program produces a set of python libraries containing infrastructure code shared by OpenStack projects. The APIs provided by these libraries should be high quality, stable, consistent and generally useful.
The process of developing a new Oslo API usually begins by taking code which is common to some OpenStack projects and moving it into this repository. Incubation shouldn't be seen as a long term option for any API - it is merely a stepping stone to inclusion into a published Oslo library.
For more information, see our wiki page:
Running Tests
To run tests in virtualenvs (preferred):
sudo pip install tox tox
To run tests in the current environment:
sudo pip install -r requirements.txt nosetests