mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-17 19:03:42 +01:00
pyln-testing: Allow up to 1000 connections to postgresql in tests
This was causing some errors when testing with a lot of parallelism (30+ tests in parallel)
This commit is contained in:
parent
0923215834
commit
d46d82eeff
@ -141,7 +141,8 @@ class PostgresDbProvider(object):
|
||||
def start(self):
|
||||
passfile = os.path.join(self.directory, "pgpass.txt")
|
||||
self.pgdir = os.path.join(self.directory, 'pgsql')
|
||||
# Need to write a tiny file containing the password so `initdb` can pick it up
|
||||
# Need to write a tiny file containing the password so `initdb` can
|
||||
# pick it up
|
||||
with open(passfile, 'w') as f:
|
||||
f.write('cltest\n')
|
||||
|
||||
@ -153,6 +154,10 @@ class PostgresDbProvider(object):
|
||||
'--auth=trust',
|
||||
'--username=postgres',
|
||||
])
|
||||
conffile = os.path.join(self.pgdir, 'postgresql.conf')
|
||||
with open(conffile, 'a') as f:
|
||||
f.write('max_connections = 1000\nshared_buffers = 240MB\n')
|
||||
|
||||
self.port = reserve()
|
||||
self.proc = subprocess.Popen([
|
||||
postgres,
|
||||
|
Loading…
Reference in New Issue
Block a user