[Tests] Fix 'Too many open files' by disabling LSD

Instances of libtorrent with Local Service Discovery enabled are leaving
many sockets fd open with every test run and will fail with 'Too many files
open' if ulimit is >=1024.
This commit is contained in:
Calum Lind 2018-05-19 21:27:48 +01:00
parent 0c574f33e1
commit ff85c334c7
4 changed files with 4 additions and 0 deletions

View File

@ -17,6 +17,7 @@ class AlertManagerTestCase(BaseTestCase):
def set_up(self):
self.core = Core()
self.core.config.config['lsd'] = False
self.am = component.get('AlertManager')
return component.start(['AlertManager'])

View File

@ -85,6 +85,7 @@ class CoreTestCase(BaseTestCase):
common.set_tmp_config_dir()
self.rpcserver = RPCServer(listen=False)
self.core = Core()
self.core.config.config['lsd'] = False
self.listen_port = 51242
return component.start().addCallback(self.start_web_server)

View File

@ -39,6 +39,7 @@ class TorrentTestCase(BaseTestCase):
self.setup_config()
self.rpcserver = RPCServer(listen=False)
self.core = Core()
self.core.config.config['lsd'] = False
self.session = lt.session()
self.torrent = None
return component.start()

View File

@ -31,6 +31,7 @@ class TorrentmanagerTestCase(BaseTestCase):
common.set_tmp_config_dir()
self.rpcserver = RPCServer(listen=False)
self.core = Core()
self.core.config.config['lsd'] = False
return component.start()
def tear_down(self):