diff options
author | Chocobozzz <me@florianbigard.com> | 2018-06-13 10:06:50 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-06-13 10:22:53 +0200 |
commit | 3cd0734fd9b0ff21aaef02317a874e8f1c06e027 (patch) | |
tree | 9e8622d269919addd35b462141ab5f22236aa6f4 /server/tests/utils/server/follows.ts | |
parent | 2186386cca113506791583cb07d6ccacba7af4e0 (diff) | |
download | PeerTube-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.ts | 3 |
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 @@ | |||
1 | import * as request from 'supertest' | 1 | import * as request from 'supertest' |
2 | import { wait } from '../miscs/miscs' | 2 | import { wait } from '../miscs/miscs' |
3 | import { ServerInfo } from './servers' | 3 | import { ServerInfo } from './servers' |
4 | import { waitJobs } from './jobs' | ||
4 | 5 | ||
5 | function getFollowersListPaginationAndSort (url: string, start: number, count: number, sort: string) { | 6 | function 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 | } |