Merge pull request #939 from LeastAuthority/3567.test_storage_client-eaddrinuse

Use a pre-bound listening socket in the test

Fixes: ticket:3567
This commit is contained in:
Jean-Paul Calderone 2020-12-21 13:27:08 -05:00 committed by GitHub
commit ab7c382dec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

0
newsfragments/3567.minor Normal file
View File

View File

@ -457,7 +457,8 @@ class StoragePluginWebPresence(AsyncTestCase):
self.storage_plugin = u"tahoe-lafs-dummy-v1"
from twisted.internet import reactor
_, port_endpoint = self.port_assigner.assign(reactor)
_, webport_endpoint = self.port_assigner.assign(reactor)
tubport_location, tubport_endpoint = self.port_assigner.assign(reactor)
tempdir = TempDir()
self.useFixture(tempdir)
@ -468,8 +469,12 @@ class StoragePluginWebPresence(AsyncTestCase):
"web": "1",
},
node_config={
"tub.location": "127.0.0.1:1",
"web.port": ensure_text(port_endpoint),
# We don't really need the main Tub listening but if we
# disable it then we also have to disable storage (because
# config validation policy).
"tub.port": tubport_endpoint,
"tub.location": tubport_location,
"web.port": ensure_text(webport_endpoint),
},
storage_plugin=self.storage_plugin,
basedir=self.basedir,