diff --git a/ceilometer/tests/publisher/test_messaging_publisher.py b/ceilometer/tests/publisher/test_messaging_publisher.py index 2a1ab30d..23420307 100644 --- a/ceilometer/tests/publisher/test_messaging_publisher.py +++ b/ceilometer/tests/publisher/test_messaging_publisher.py @@ -218,6 +218,8 @@ class TestPublisher(testscenarios.testcase.WithScenarios, if self.pub_func == 'publish_events' else self.CONF.publisher_rpc.metering_topic) + +class TestPublisherPolicy(TestPublisher): def test_published_concurrency(self): """Test concurrent access to the local queue of the rpc publisher.""" @@ -294,6 +296,10 @@ class TestPublisher(testscenarios.testcase.WithScenarios, fake_send.assert_called_once_with( mock.ANY, self.topic, mock.ANY) + +@mock.patch('ceilometer.publisher.messaging.LOG', mock.Mock()) +class TestPublisherPolicyReactions(TestPublisher): + def test_published_with_policy_drop_and_rpc_down(self): publisher = self.publisher_cls( netutils.urlsplit('%s://?policy=drop' % self.protocol))