AsyncTestCase is required for AsyncEventPublisher

Other tests that use AsyncTestCase's io_loop will break if AsyncTestCase
is not subclassed when a test instantiates AsyncEventPublisher.
This commit is contained in:
Daniel A. Wozniak 2018-04-16 14:18:08 -07:00
parent 03892eaf0b
commit 3d85e30ce5
No known key found for this signature in database
GPG key ID: 166B9D2C06C82D61

View file

@ -18,12 +18,13 @@ from salt.utils import event
from salt.exceptions import SaltSystemExit
import salt.syspaths
import tornado
import tornado.testing
__opts__ = {}
@skipIf(NO_MOCK, NO_MOCK_REASON)
class MinionTestCase(TestCase):
class MinionTestCase(TestCase, tornado.testing.AsyncTestCase):
def test_invalid_master_address(self):
with patch.dict(__opts__, {'ipv6': False, 'master': float('127.0'), 'master_port': '4555', 'retry_dns': False}):
self.assertRaises(SaltSystemExit, minion.resolve_dns, __opts__)