nova/nova/tests/functional/notification_sample_tests
Balazs Gibizer 8afc39a2c7 Stabilize unshelve notification sample tests
The notification sample test for unshelve waits for the instance to
reach ACTIVE state and then asserts if unshelve.end notification is
emitted properly. However the instance.vm_state is set to ACTIVE earlier[1]
than emitting the unshelve.end notification[2]. This can cause two
different test case failure.

1) _test_unshelve_server() fails with no ushelve.end notification
received.

2) _test_shelve_and_shelve_offload_server() also has a unshelve action
at the end and that test step also only waits for the the ACTIVE state.
So the unshelve.end notification from the end of
_test_shelve_and_shelve_offload_server() can bleed into the
_test_unshelve_server() step causing that it receive one more
notifications.

So this patch adds an extra
self._wait_for_notification('instance.unshelve.end') call to each test
step to prevent the instability.

[1] https://github.com/openstack/nova/blob/5c6c1f8f/nova/compute/manager.py#L5322-L5326
[2] https://github.com/openstack/nova/blob/5c6c1f8f/nova/compute/manager.py#L5329
[3] https://github.com/openstack/nova/blob/5c6c1f8f/nova/tests/functional/notification_sample_tests/test_instance.py#L836

Conflicts:
      nova/tests/functional/notification_sample_tests/test_instance.py
Conflicts due to:
* I1a0afa0e8740c229db77c18b932e316196880de5

Closes-Bug: #1835070

Change-Id: Ie217523a8969326b27930d7f74e50e9b352ab7a1
(cherry picked from commit 40f1e7c4c2)
(cherry picked from commit 3bc6ff029f)
(cherry picked from commit a85ce04fa3)
2019-08-05 17:15:55 +02:00
..
__init__.py Adds json sample for the versioned notifications 2016-01-28 15:31:21 +01:00
notification_sample_base.py Increase notification wait timeout in functional tests 2018-01-11 14:23:15 +01:00
test_aggregate.py Transform aggregate.remove_host notification 2017-09-08 16:24:10 +02:00
test_exception_notification.py Transform aggregate.create notification 2017-01-04 17:44:30 +00:00
test_flavor.py Add microversion to allow setting flavor description 2017-11-15 22:10:39 +00:00
test_instance.py Stabilize unshelve notification sample tests 2019-08-05 17:15:55 +02:00
test_keypair.py Transform keypair.import notification 2017-10-30 16:44:29 -04:00
test_server_group.py Transform servergroup.delete notification 2017-09-08 13:01:20 +00:00
test_service.py Address nits from service create/destroy notification review 2017-11-27 11:42:13 -05:00