]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Stop exception log in Big Switch unit tests
authorKevin Benton <blak111@gmail.com>
Wed, 17 Sep 2014 08:36:03 +0000 (01:36 -0700)
committerKevin Benton <blak111@gmail.com>
Wed, 17 Sep 2014 08:37:23 +0000 (01:37 -0700)
Reduce unit test log sizes by removing stack trace
exception logging in Big Switch unit tests.

Closes-Bug: #1370898
Change-Id: Id808edb5db567db31b6c1366e20948683f20118a

neutron/tests/unit/bigswitch/test_base.py

index 422c5b95d46432e5642865cad12c4c8ff11f0bf4..c031d26599fb6fbe58aac60717fa3fe442244215 100644 (file)
@@ -60,6 +60,10 @@ class BigSwitchTestBase(object):
         self.spawn_p = mock.patch(SPAWN, new=lambda *args, **kwargs: None)
         # prevent the consistency watchdog from starting
         self.watch_p = mock.patch(CWATCH, new=lambda *args, **kwargs: None)
+        # disable exception log to prevent json parse error from showing
+        self.log_exc_p = mock.patch(SERVER_MANAGER + ".LOG.exception",
+                                    new=lambda *args, **kwargs: None)
+        self.log_exc_p.start()
         self.plugin_notifier_p.start()
         self.spawn_p.start()
         self.watch_p.start()