From e9e12653f899b1cbb202a0869ebca0cd8e402e56 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Tue, 26 Apr 2016 13:39:30 -0700 Subject: [PATCH] SystemTestMixin: don't auto-detect IP addresses The tubs created for test_system should always use 127.0.0.1 . refs ticket:2491 --- src/allmydata/test/common.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/allmydata/test/common.py b/src/allmydata/test/common.py index 57e1704b4..a6c250da9 100644 --- a/src/allmydata/test/common.py +++ b/src/allmydata/test/common.py @@ -18,7 +18,7 @@ from allmydata.storage_client import StubServer from allmydata.mutable.layout import unpack_header from allmydata.mutable.publish import MutableData from allmydata.storage.mutable import MutableShareFile -from allmydata.util import hashutil, log, fileutil, pollmixin +from allmydata.util import hashutil, log, fileutil, pollmixin, iputil from allmydata.util.assertutil import precondition from allmydata.util.consumer import download_to_data from allmydata.stats import StatsGathererService @@ -557,6 +557,11 @@ class SystemTestMixin(pollmixin.PollMixin, testutil.StallMixin): nodeconfig = "[node]\n" nodeconfig += (u"nickname = client %d \u263A\n" % (i,)).encode('utf-8') + tub_port = iputil.allocate_tcp_port() + # Don't let it use AUTO: there's no need for tests to use + # anything other than 127.0.0.1 + nodeconfig += "tub.port = tcp:%d\n" % tub_port + nodeconfig += "tub.location = tcp:127.0.0.1:%d\n" % tub_port if i == 0: # clients[0] runs a webserver and a helper, no key_generator