aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils/server/follows.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-06-13 10:06:50 +0200
committerChocobozzz <me@florianbigard.com>2018-06-13 10:22:53 +0200
commit3cd0734fd9b0ff21aaef02317a874e8f1c06e027 (patch)
tree9e8622d269919addd35b462141ab5f22236aa6f4 /server/tests/utils/server/follows.ts
parent2186386cca113506791583cb07d6ccacba7af4e0 (diff)
downloadPeerTube-3cd0734fd9b0ff21aaef02317a874e8f1c06e027.tar.gz
PeerTube-3cd0734fd9b0ff21aaef02317a874e8f1c06e027.tar.zst
PeerTube-3cd0734fd9b0ff21aaef02317a874e8f1c06e027.zip
Improve tests when waiting pending jobs
Diffstat (limited to 'server/tests/utils/server/follows.ts')
-rw-r--r--server/tests/utils/server/follows.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/tests/utils/server/follows.ts b/server/tests/utils/server/follows.ts
index 82e89175c..d21fb5e58 100644
--- a/server/tests/utils/server/follows.ts
+++ b/server/tests/utils/server/follows.ts
@@ -1,6 +1,7 @@
1import * as request from 'supertest' 1import * as request from 'supertest'
2import { wait } from '../miscs/miscs' 2import { wait } from '../miscs/miscs'
3import { ServerInfo } from './servers' 3import { ServerInfo } from './servers'
4import { waitJobs } from './jobs'
4 5
5function getFollowersListPaginationAndSort (url: string, start: number, count: number, sort: string) { 6function getFollowersListPaginationAndSort (url: string, start: number, count: number, sort: string) {
6 const path = '/api/v1/server/followers' 7 const path = '/api/v1/server/followers'
@@ -61,7 +62,7 @@ async function doubleFollow (server1: ServerInfo, server2: ServerInfo) {
61 ]) 62 ])
62 63
63 // Wait request propagation 64 // Wait request propagation
64 await wait(10000) 65 await waitJobs([ server1, server2 ])
65 66
66 return true 67 return true
67} 68}