diff options
author | Green-Star <Green-Star@users.noreply.github.com> | 2017-07-02 20:48:31 +0200 |
---|---|---|
committer | Bigard Florian <florian.bigard@gmail.com> | 2017-07-02 20:48:31 +0200 |
commit | 5fe7e898316e18369c3e1aba307b55077adc7bfb (patch) | |
tree | 1ea859558b44250dce43be1be7261c2e79df454b /server/tests/api/friends-basic.js | |
parent | ba44fa19531186944fef3e9da34f5e91f0c0dedb (diff) | |
download | PeerTube-5fe7e898316e18369c3e1aba307b55077adc7bfb.tar.gz PeerTube-5fe7e898316e18369c3e1aba307b55077adc7bfb.tar.zst PeerTube-5fe7e898316e18369c3e1aba307b55077adc7bfb.zip |
Fix test (#71)
* Fix timeouting tests
* Increase timeout to be sure requests will be propagated
* Add timeout to be sure video views will be updated
* Use standard style
* Fix PR comments.
Diffstat (limited to 'server/tests/api/friends-basic.js')
-rw-r--r-- | server/tests/api/friends-basic.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/server/tests/api/friends-basic.js b/server/tests/api/friends-basic.js index 658e54829..4c2043b39 100644 --- a/server/tests/api/friends-basic.js +++ b/server/tests/api/friends-basic.js | |||
@@ -47,7 +47,7 @@ describe('Test basic friends', function () { | |||
47 | // --------------------------------------------------------------- | 47 | // --------------------------------------------------------------- |
48 | 48 | ||
49 | before(function (done) { | 49 | before(function (done) { |
50 | this.timeout(20000) | 50 | this.timeout(120000) |
51 | serversUtils.flushAndRunMultipleServers(3, function (serversRun, urlsRun) { | 51 | serversUtils.flushAndRunMultipleServers(3, function (serversRun, urlsRun) { |
52 | servers = serversRun | 52 | servers = serversRun |
53 | 53 | ||
@@ -76,7 +76,7 @@ describe('Test basic friends', function () { | |||
76 | }) | 76 | }) |
77 | 77 | ||
78 | it('Should make friends', function (done) { | 78 | it('Should make friends', function (done) { |
79 | this.timeout(40000) | 79 | this.timeout(120000) |
80 | 80 | ||
81 | series([ | 81 | series([ |
82 | // The second pod make friend with the third | 82 | // The second pod make friend with the third |
@@ -142,11 +142,14 @@ describe('Test basic friends', function () { | |||
142 | }) | 142 | }) |
143 | 143 | ||
144 | it('Should not be allowed to make friend again', function (done) { | 144 | it('Should not be allowed to make friend again', function (done) { |
145 | this.timeout(10000) | ||
145 | const server = servers[1] | 146 | const server = servers[1] |
146 | podsUtils.makeFriends(server.url, server.accessToken, 409, done) | 147 | podsUtils.makeFriends(server.url, server.accessToken, 409, done) |
147 | }) | 148 | }) |
148 | 149 | ||
149 | it('Should quit friends of pod 2', function (done) { | 150 | it('Should quit friends of pod 2', function (done) { |
151 | this.timeout(10000) | ||
152 | |||
150 | series([ | 153 | series([ |
151 | // Pod 1 quit friends | 154 | // Pod 1 quit friends |
152 | function (next) { | 155 | function (next) { |
@@ -183,7 +186,7 @@ describe('Test basic friends', function () { | |||
183 | }) | 186 | }) |
184 | 187 | ||
185 | it('Should allow pod 2 to make friend again', function (done) { | 188 | it('Should allow pod 2 to make friend again', function (done) { |
186 | this.timeout(20000) | 189 | this.timeout(120000) |
187 | 190 | ||
188 | const server = servers[1] | 191 | const server = servers[1] |
189 | podsUtils.makeFriends(server.url, server.accessToken, function () { | 192 | podsUtils.makeFriends(server.url, server.accessToken, function () { |