]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/extra-utils/server/servers.ts
Merge branch 'release/2.2.0' into develop
[github/Chocobozzz/PeerTube.git] / shared / extra-utils / server / servers.ts
index a0f0ce9c9792f11885e0a8ff5cd0814ab057bb65..0f883d839c08bf3eedc71cf19a020dcbf6350228 100644 (file)
@@ -285,7 +285,7 @@ function cleanupTests (servers: ServerInfo[]) {
   return Promise.all(p)
 }
 
-async function waitUntilLog (server: ServerInfo, str: string, count = 1) {
+async function waitUntilLog (server: ServerInfo, str: string, count = 1, strictCount = true) {
   const logfile = join(root(), 'test' + server.internalServerNumber, 'logs/peertube.log')
 
   while (true) {
@@ -293,6 +293,7 @@ async function waitUntilLog (server: ServerInfo, str: string, count = 1) {
 
     const matches = buf.toString().match(new RegExp(str, 'g'))
     if (matches && matches.length === count) return
+    if (matches && strictCount === false && matches.length >= count) return
 
     await wait(1000)
   }