From afab7c67011fad40fec87749679137d31aa20540 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C5=82awek=20Kap=C5=82o=C5=84ski?= Date: Sun, 29 Jan 2017 09:44:03 +0000 Subject: [PATCH] Display deprecation warning in test only once WarningsFixture class was set to display deprecation warnings "alway" - which means every occurence of a warning. Since oslo.context 2.12.0 there was huge amount of such warnings displayed. It causes functional tests fails due to reach global timeout for tests. Now deprecation warning should be disaplayed only on first occurence of matching warning in test. Change-Id: I91196a8457c25e6eb5561fb74fd5864de85a070a Closes-Bug: 1660088 --- neutron/tests/tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neutron/tests/tools.py b/neutron/tests/tools.py index 2db1b76aedb..2a4ca21ba8b 100644 --- a/neutron/tests/tools.py +++ b/neutron/tests/tools.py @@ -78,7 +78,7 @@ class WarningsFixture(fixtures.Fixture): self.addCleanup(warnings.resetwarnings) for wtype in self.warning_types: warnings.filterwarnings( - "always", category=wtype, module='^neutron\\.') + "once", category=wtype, module='^neutron\\.') class OpenFixture(fixtures.Fixture):