nova/nova/tests/functional/api
melanie witt ffce5be5ca Replace time.sleep(10) with service forced_down in tests
The server group functional tests are doing time.sleep(10) in order
to make sure a stopped compute service is considered "down" by the nova
compute API.

Instead of sleeping, we can set the service as "forced_down" to get the
desired "down" compute service status and avoid unnecessary delays in
these tests.

Unnecessary service start() calls are also removed in this change. They
appear at the end of tests and services are started during each test
setUp() and killed during each test tearDown() via the ServiceFixture.

Closes-Bug: #1783565

NOTE(melwitt): The differences from the cherry picked change are:

  * Addition of 'from nova import utils' because change
    Ie07b419732e0832a9b9d16565f6c9d00ba85d654 is not in Rocky

  * Addition of the put_service_force_down method for the API client
    because change If0693eab2ed31b5fbfe6cbafa5d67b69c2ed8442 is not
    in Rocky

Change-Id: I74f64b68e4b33ee0f8c45fdc5f570c7e12e05d3b
(cherry picked from commit 1c93ca82b8)
(cherry picked from commit a5daa0ddb3)
(cherry picked from commit 92eb45ba5e)
2019-11-27 02:01:12 +00:00
..
openstack Consider root id is None in the database case 2018-11-20 14:06:34 -05:00
__init__.py move the integrated tests into the functional tree 2014-11-26 13:17:20 -05:00
client.py Replace time.sleep(10) with service forced_down in tests 2019-11-27 02:01:12 +00:00