Merge "tests: Add decorator to mark unstable tests"
This commit is contained in:
commit
7d14cdc368
|
@ -98,6 +98,20 @@ def sanitize_log_path(path):
|
|||
return path
|
||||
|
||||
|
||||
def unstable_test(reason):
|
||||
def decor(f):
|
||||
@functools.wraps(f)
|
||||
def inner(self, *args, **kwargs):
|
||||
try:
|
||||
return f(self, *args, **kwargs)
|
||||
except Exception as e:
|
||||
msg = ("%s was marked as unstable because of %s, "
|
||||
"failure was: %s") % (self.id(), reason, e)
|
||||
raise self.skipTest(msg)
|
||||
return inner
|
||||
return decor
|
||||
|
||||
|
||||
class AttributeDict(dict):
|
||||
|
||||
"""
|
||||
|
|
|
@ -21,6 +21,7 @@ from oslo_utils import uuidutils
|
|||
import testscenarios
|
||||
|
||||
from neutron.common import utils as common_utils
|
||||
from neutron.tests import base as tests_base
|
||||
from neutron.tests.common import net_helpers
|
||||
from neutron.tests.fullstack import base
|
||||
from neutron.tests.fullstack.resources import config
|
||||
|
@ -116,6 +117,7 @@ class TestOvsConnectivitySameNetwork(BaseConnectivitySameNetworkTest):
|
|||
scenarios = testscenarios.multiply_scenarios(
|
||||
network_scenarios, utils.get_ovs_interface_scenarios())
|
||||
|
||||
@tests_base.unstable_test("bug 1728948")
|
||||
def test_connectivity(self):
|
||||
self._test_connectivity()
|
||||
|
||||
|
|
Loading…
Reference in New Issue