Comment 7 for bug 1946339

Revision history for this message
Balazs Gibizer (balazs-gibizer) wrote : Re: test_unshelve_offloaded_server_with_qos_port_pci_update_fails

I know now what it the global that facilitate the effect between the two test cases.

When a versioned notification is emitted the code in [1] calls the nova.rpc.get_versioned_notifier() which uses the global NOTIFIER[2] from the rpc module. This global is properly reset between tests, but still if the first testcase runs [1] 60 seconds after the testcase is finished, another testcase already re-initialized the NOTIFIER with a valid FakeVersionedNotifier that can be used to deliver notifications. In this case the first test case delivers a notification to the later testcase making that to fail.

[1] https://github.com/openstack/nova/blob/50fdbc752a9ca9c31488140ef2997ed59d861a41/nova/notifications/objects/base.py#L211
[2] https://github.com/openstack/nova/blob/50fdbc752a9ca9c31488140ef2997ed59d861a41/nova/rpc.py#L239