提交 c8102302 编写于 作者: C Cleber Rosa

selftests/unit/test_utils_cloudinit.py: not require sequential ports

The network utility used to (attempt to) get a free port defaults to
picking sequential ports.  But, that's not a requirement of this test.
When running tests in parallel, the same port may get allocated when a
sequential approach is used, and that is greatly minimized when random
ports are requested.
Signed-off-by: NCleber Rosa <crosa@redhat.com>
上级 1e72420c
......@@ -65,7 +65,7 @@ class PhoneHome(unittest.TestCase):
conn.close()
def setUp(self):
self.port = network.find_free_port(address=self.ADDRESS)
self.port = network.find_free_port(address=self.ADDRESS, sequent=False)
self.instance_id = data_factory.generate_random_string(12)
self.server = cloudinit.PhoneHomeServer((self.ADDRESS, self.port),
self.instance_id)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册