aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/server/servers.ts
diff options
context:
space:
mode:
Diffstat (limited to 'shared/extra-utils/server/servers.ts')
-rw-r--r--shared/extra-utils/server/servers.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/shared/extra-utils/server/servers.ts b/shared/extra-utils/server/servers.ts
index a0f0ce9c9..0f883d839 100644
--- a/shared/extra-utils/server/servers.ts
+++ b/shared/extra-utils/server/servers.ts
@@ -285,7 +285,7 @@ function cleanupTests (servers: ServerInfo[]) {
285 return Promise.all(p) 285 return Promise.all(p)
286} 286}
287 287
288async function waitUntilLog (server: ServerInfo, str: string, count = 1) { 288async function waitUntilLog (server: ServerInfo, str: string, count = 1, strictCount = true) {
289 const logfile = join(root(), 'test' + server.internalServerNumber, 'logs/peertube.log') 289 const logfile = join(root(), 'test' + server.internalServerNumber, 'logs/peertube.log')
290 290
291 while (true) { 291 while (true) {
@@ -293,6 +293,7 @@ async function waitUntilLog (server: ServerInfo, str: string, count = 1) {
293 293
294 const matches = buf.toString().match(new RegExp(str, 'g')) 294 const matches = buf.toString().match(new RegExp(str, 'g'))
295 if (matches && matches.length === count) return 295 if (matches && matches.length === count) return
296 if (matches && strictCount === false && matches.length >= count) return
296 297
297 await wait(1000) 298 await wait(1000)
298 } 299 }