Suppress policy deprecation warnings in unit tests
Since the WSGI app is reinitialized pretty much for every unit test, and
we have deprecated so many policies, we get hundreds of megabytes of
deprecation warnings in the unit test logs. This is unnecessary for unit
tests, a noisy hindrance to developers, and causes a high failure rate
in our CI due to the huge logs. This change fixes the issue for the unit
tests by adding warnings filters for DeprecationWarnings and
UserWarnings from oslo.policy and oslo.context.
This does not solve the issue that deployers see a lot of noise in their
logs. However, since production servers aren't reinitializing the WSGI
app quite so often, it's a less severe issue.
Reviewed: https:/ /review. opendev. org/673933 /git.openstack. org/cgit/ openstack/ keystone/ commit/ ?id=e8151070c05 2c2a26037cdad3a d3330899ff334b
Committed: https:/
Submitter: Zuul
Branch: master
commit e8151070c052c2a 26037cdad3ad333 0899ff334b
Author: Colleen Murphy <email address hidden>
Date: Wed Jul 31 18:28:16 2019 -0700
Suppress policy deprecation warnings in unit tests
Since the WSGI app is reinitialized pretty much for every unit test, and
we have deprecated so many policies, we get hundreds of megabytes of
deprecation warnings in the unit test logs. This is unnecessary for unit
tests, a noisy hindrance to developers, and causes a high failure rate
in our CI due to the huge logs. This change fixes the issue for the unit
tests by adding warnings filters for DeprecationWarnings and
UserWarnings from oslo.policy and oslo.context.
This does not solve the issue that deployers see a lot of noise in their
logs. However, since production servers aren't reinitializing the WSGI
app quite so often, it's a less severe issue.
Related-bug: #1836568
Change-Id: Iaa7eae03bde7ab 43a8c5a5886686f 834cf7ec620 /review. opendev. org/673932
Depends-on: https:/