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/api/videos/video-description.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/api/videos/video-description.ts')
-rw-r--r-- | server/tests/api/videos/video-description.ts | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/server/tests/api/videos/video-description.ts b/server/tests/api/videos/video-description.ts index c2985194c..dd5cd78c0 100644 --- a/server/tests/api/videos/video-description.ts +++ b/server/tests/api/videos/video-description.ts | |||
@@ -4,7 +4,6 @@ import * as chai from 'chai' | |||
4 | import 'mocha' | 4 | import 'mocha' |
5 | import { | 5 | import { |
6 | flushAndRunMultipleServers, | 6 | flushAndRunMultipleServers, |
7 | flushTests, | ||
8 | getVideo, | 7 | getVideo, |
9 | getVideoDescription, | 8 | getVideoDescription, |
10 | getVideosList, | 9 | getVideosList, |
@@ -12,10 +11,10 @@ import { | |||
12 | ServerInfo, | 11 | ServerInfo, |
13 | setAccessTokensToServers, | 12 | setAccessTokensToServers, |
14 | updateVideo, | 13 | updateVideo, |
15 | uploadVideo, | 14 | uploadVideo |
16 | wait | ||
17 | } from '../../utils/index' | 15 | } from '../../utils/index' |
18 | import { doubleFollow } from '../../utils/server/follows' | 16 | import { doubleFollow } from '../../utils/server/follows' |
17 | import { waitJobs } from '../../utils/server/jobs' | ||
19 | 18 | ||
20 | const expect = chai.expect | 19 | const expect = chai.expect |
21 | 20 | ||
@@ -46,7 +45,7 @@ describe('Test video description', function () { | |||
46 | } | 45 | } |
47 | await uploadVideo(servers[0].url, servers[0].accessToken, attributes) | 46 | await uploadVideo(servers[0].url, servers[0].accessToken, attributes) |
48 | 47 | ||
49 | await wait(5000) | 48 | await waitJobs(servers) |
50 | 49 | ||
51 | const res = await getVideosList(servers[0].url) | 50 | const res = await getVideosList(servers[0].url) |
52 | 51 | ||
@@ -85,7 +84,7 @@ describe('Test video description', function () { | |||
85 | } | 84 | } |
86 | await updateVideo(servers[0].url, servers[0].accessToken, videoId, attributes) | 85 | await updateVideo(servers[0].url, servers[0].accessToken, videoId, attributes) |
87 | 86 | ||
88 | await wait(5000) | 87 | await waitJobs(servers) |
89 | }) | 88 | }) |
90 | 89 | ||
91 | it('Should have a small description on each server', async function () { | 90 | it('Should have a small description on each server', async function () { |
@@ -102,10 +101,5 @@ describe('Test video description', function () { | |||
102 | 101 | ||
103 | after(async function () { | 102 | after(async function () { |
104 | killallServers(servers) | 103 | killallServers(servers) |
105 | |||
106 | // Keep the logs if the test failed | ||
107 | if (this['ok']) { | ||
108 | await flushTests() | ||
109 | } | ||
110 | }) | 104 | }) |
111 | }) | 105 | }) |