netutil_test: Disable error tests on TwistedResolver
These tests are flaky with the new "messages to stderr are errors" check.
This commit is contained in:
parent
3745755173
commit
5ab1eba2c2
|
@ -184,12 +184,16 @@ class CaresResolverTest(AsyncTestCase, _ResolverTestMixin):
|
||||||
|
|
||||||
|
|
||||||
# TwistedResolver produces consistent errors in our test cases so we
|
# TwistedResolver produces consistent errors in our test cases so we
|
||||||
# can test the regular and error cases in the same class.
|
# could test the regular and error cases in the same class. However,
|
||||||
|
# in the error cases it appears that cleanup of socket objects is
|
||||||
|
# handled asynchronously and occasionally results in "unclosed socket"
|
||||||
|
# warnings if not given time to shut down (and there is no way to
|
||||||
|
# explicitly shut it down). This makes the test flaky, so we do not
|
||||||
|
# test error cases here.
|
||||||
@skipIfNoNetwork
|
@skipIfNoNetwork
|
||||||
@unittest.skipIf(twisted is None, "twisted module not present")
|
@unittest.skipIf(twisted is None, "twisted module not present")
|
||||||
@unittest.skipIf(getattr(twisted, '__version__', '0.0') < "12.1", "old version of twisted")
|
@unittest.skipIf(getattr(twisted, '__version__', '0.0') < "12.1", "old version of twisted")
|
||||||
class TwistedResolverTest(AsyncTestCase, _ResolverTestMixin,
|
class TwistedResolverTest(AsyncTestCase, _ResolverTestMixin):
|
||||||
_ResolverErrorTestMixin):
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(TwistedResolverTest, self).setUp()
|
super(TwistedResolverTest, self).setUp()
|
||||||
self.resolver = TwistedResolver()
|
self.resolver = TwistedResolver()
|
||||||
|
|
Loading…
Reference in New Issue