From 1b05d82d861f42c27766e9f24d8d55e68b0cf098 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 9 Apr 2020 11:00:30 +0200 Subject: Add SQL query support in plugins --- shared/extra-utils/server/servers.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'shared/extra-utils/server/servers.ts') 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[]) { 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) } -- cgit v1.2.3