diff options
author | Chocobozzz <me@florianbigard.com> | 2020-04-09 11:00:30 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-04-09 11:00:30 +0200 |
commit | 1b05d82d861f42c27766e9f24d8d55e68b0cf098 (patch) | |
tree | bbf14abc606dd3f8f0c13625afbdf3b17fea3a23 /shared | |
parent | bc0d801bb7a0cc503c1637f4a07bb51d68d85608 (diff) | |
download | PeerTube-1b05d82d861f42c27766e9f24d8d55e68b0cf098.tar.gz PeerTube-1b05d82d861f42c27766e9f24d8d55e68b0cf098.tar.zst PeerTube-1b05d82d861f42c27766e9f24d8d55e68b0cf098.zip |
Add SQL query support in plugins
Diffstat (limited to 'shared')
-rw-r--r-- | shared/extra-utils/server/servers.ts | 3 |
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 | ||
288 | async function waitUntilLog (server: ServerInfo, str: string, count = 1) { | 288 | async 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 | } |