test: stabilize log probe in test_pool_acquisition_timeout
There's two lines of log output, and their order is not deterministic.
This commit is contained in:
@@ -42,6 +42,18 @@ class PostgrestProcess:
|
||||
process: object
|
||||
session: object
|
||||
|
||||
def read_stdout(self, nlines=1):
|
||||
"Wait for line(s) on standard output."
|
||||
output = []
|
||||
for _ in range(10):
|
||||
l = self.process.stdout.readline()
|
||||
if l:
|
||||
output.append(l.decode())
|
||||
if len(output) >= nlines:
|
||||
break
|
||||
time.sleep(0.1)
|
||||
return output
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
def run(
|
||||
|
||||
Reference in New Issue
Block a user