mirror of
https://github.com/facebook/sapling.git
synced 2024-10-12 01:39:21 +03:00
tests: use hostname instead of localhost
The test_push_command test was failing on our machines because the machines are ipv6 but expose ipv4 on the 127.0.0.1 loopback interface. This caused the svnserve process to listen via ipv4, but the connecting process would attempt to connect on ipv6 and fail. Using the hostname causes it to listen using the primary network interface, which matches the interface that is used when the connecting client resolves the hostname. So the test now passes.
This commit is contained in:
parent
b74f10ba72
commit
6099956ed8
@ -138,7 +138,7 @@ class PushTests(test_util.TestBase):
|
||||
open(os.path.join(repo_path, 'conf', 'svnserve.conf'),
|
||||
'w').write('[general]\nanon-access=write\n[sasl]\n')
|
||||
self.port = random.randint(socket.IPPORT_USERRESERVED, 65535)
|
||||
self.host = 'localhost'
|
||||
self.host = socket.gethostname()
|
||||
args = ['svnserve', '--daemon', '--foreground',
|
||||
'--listen-port=%d' % self.port,
|
||||
'--listen-host=%s' % self.host,
|
||||
|
Loading…
Reference in New Issue
Block a user