Skip to content

Commit 2bb8689

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Revert "Add logging to find test cases leaking libvirt threads""
2 parents 59f7a52 + cbed398 commit 2bb8689

File tree

2 files changed

+0
-44
lines changed

2 files changed

+0
-44
lines changed

nova/tests/fixtures/nova.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1822,24 +1822,6 @@ def __init__(self, test, modules):
18221822

18231823
def find_spec(self, fullname, path, target=None):
18241824
if fullname in self.modules:
1825-
current = eventlet.getcurrent()
1826-
# NOTE(gibi) not all eventlet spawn is under our control, so
1827-
# there can be senders without test_case_id set, find the first
1828-
# ancestor that was spawned from nova.utils.spawn[_n] and
1829-
# therefore has the id set.
1830-
while (
1831-
current is not None and
1832-
not getattr(current, 'test_case_id', None)
1833-
):
1834-
current = current.parent
1835-
1836-
if current is not None:
1837-
self.test.tc_id = current.test_case_id
1838-
LOG.warning(
1839-
"!!!---!!! TestCase ID %s hit the import poison while "
1840-
"importing %s. If you see this in a failed functional "
1841-
"test then please let #openstack-nova on IRC know "
1842-
"about it. !!!---!!!", current.test_case_id, fullname)
18431825
self.test.fail_message = (
18441826
f"This test imports the '{fullname}' module, which it "
18451827
f'should not in the test environment. Please add '
@@ -1850,7 +1832,6 @@ def find_spec(self, fullname, path, target=None):
18501832
def __init__(self, module_names):
18511833
self.module_names = module_names
18521834
self.fail_message = ''
1853-
self.tc_id = None
18541835
if isinstance(module_names, str):
18551836
self.module_names = {module_names}
18561837
self.meta_path_finder = self.ForbiddenModules(self, self.module_names)
@@ -1868,13 +1849,6 @@ def cleanup(self):
18681849
# there (which is also what self.assert* and self.fail() do underneath)
18691850
# will not work to cause a failure in the test.
18701851
if self.fail_message:
1871-
if self.tc_id is not None:
1872-
LOG.warning(
1873-
"!!!---!!! TestCase ID %s hit the import poison. If you "
1874-
"see this in a failed functional test then please let "
1875-
"#openstack-nova on IRC know about it. !!!---!!!",
1876-
self.tc_id
1877-
)
18781852
raise ImportError(self.fail_message)
18791853

18801854

nova/virt/libvirt/driver.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10086,24 +10086,6 @@ def live_migration_abort(self, instance):
1008610086
:param instance: instance object that is in migration
1008710087

1008810088
"""
10089-
current = eventlet.getcurrent()
10090-
# NOTE(gibi) not all eventlet spawn is under our control, so
10091-
# there can be senders without test_case_id set, find the first
10092-
# ancestor that was spawned from nova.utils.spawn[_n] and
10093-
# therefore has the id set.
10094-
while (
10095-
current is not None and
10096-
not getattr(current, 'test_case_id', None)
10097-
):
10098-
current = current.parent
10099-
10100-
if current is not None:
10101-
LOG.warning(
10102-
"!!!---!!! live_migration_abort thread was spawned by "
10103-
"TestCase ID: %s. If you see this in a failed functional test "
10104-
"then please let #openstack-nova on IRC know about it. "
10105-
"!!!---!!!", current.test_case_id
10106-
)
1010710089

1010810090
guest = self._host.get_guest(instance)
1010910091
dom = guest._domain

0 commit comments

Comments
 (0)