diff options
author | Balazs Gibizer <balazs.gibizer@ericsson.com> | 2017-02-02 17:49:58 +0100 |
---|---|---|
committer | melanie witt <melwittt@gmail.com> | 2017-03-30 22:32:14 +0000 |
commit | 29cb8f1c459e6d23dd9303fb570cee773d9c4d02 (patch) | |
tree | c8193b214661bb835a78d3f75ca7920bbdec959a /nova/test.py | |
parent | 1e0e4080fbe0515e6c0734ae3907d6a5d0e3079f (diff) | |
download | nova-29cb8f1c459e6d23dd9303fb570cee773d9c4d02.tar.gz |
Short circuit notifications when not enabled
Wasting time on generating the payload of the notifications is
unnecessary if the notification will not be emitted due to
configuration.
This patch depends on an oslo messaging improvement that adds
a way to check if a Notifier will emit the notification or not.
Depends-On: Ib992f5c20fef85224fb00823e1d8d9c6cff19bec
Depends-On: I979fb3385671aba6f4162ef991da8f0febe0068a
Change-Id: I3e6741d59df49e1e58409314008c2ed609fdedc1
Diffstat (limited to 'nova/test.py')
-rw-r--r-- | nova/test.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/nova/test.py b/nova/test.py index c8050e30d9..dc71ccae16 100644 --- a/nova/test.py +++ b/nova/test.py @@ -223,6 +223,12 @@ class TestCase(testtools.TestCase): self.useFixture(conf_fixture.ConfFixture(CONF)) self.useFixture(nova_fixtures.RPCFixture('nova.test')) + # we cannot set this in the ConfFixture as oslo only registers the + # notification opts at the first instantiation of a Notifier that + # happens only in the RPCFixture + CONF.set_default('driver', ['test'], + group='oslo_messaging_notifications') + # NOTE(danms): Make sure to reset us back to non-remote objects # for each test to avoid interactions. Also, backup the object # registry. |