aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/friendsAdvanced.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-06-18 16:13:54 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-06-18 16:13:54 +0200
commit528a9efa8272532bbd0dafc35c3e05e57c50f61e (patch)
tree62d4417df4ab9b2e53c44dc7271be81b88e4e0e5 /server/tests/api/friendsAdvanced.js
parentb2e4c0ba1a33b8a50491a1f8d111468a7da5640f (diff)
downloadPeerTube-528a9efa8272532bbd0dafc35c3e05e57c50f61e.tar.gz
PeerTube-528a9efa8272532bbd0dafc35c3e05e57c50f61e.tar.zst
PeerTube-528a9efa8272532bbd0dafc35c3e05e57c50f61e.zip
Try to make a better communication (between pods) module
Diffstat (limited to 'server/tests/api/friendsAdvanced.js')
-rw-r--r--server/tests/api/friendsAdvanced.js19
1 files changed, 17 insertions, 2 deletions
diff --git a/server/tests/api/friendsAdvanced.js b/server/tests/api/friendsAdvanced.js
index 86620254e..b082270ff 100644
--- a/server/tests/api/friendsAdvanced.js
+++ b/server/tests/api/friendsAdvanced.js
@@ -130,6 +130,18 @@ describe('Test advanced friends', function () {
130 function (next) { 130 function (next) {
131 makeFriends(4, next) 131 makeFriends(4, next)
132 }, 132 },
133 // Check the pods 1, 2, 3 and 4 are friends
134 function (next) {
135 async.each([ 1, 2, 3, 4 ], function (i, callback) {
136 getFriendsList(i, function (err, res) {
137 if (err) throw err
138
139 expect(res.body.length).to.equal(3)
140
141 callback()
142 })
143 }, next)
144 },
133 // Kill pod 4 145 // Kill pod 4
134 function (next) { 146 function (next) {
135 servers[3].app.kill() 147 servers[3].app.kill()
@@ -152,7 +164,7 @@ describe('Test advanced friends', function () {
152 uploadVideo(2, next) 164 uploadVideo(2, next)
153 }, 165 },
154 function (next) { 166 function (next) {
155 setTimeout(next, 20000) 167 setTimeout(next, 11000)
156 }, 168 },
157 // Rerun server 4 169 // Rerun server 4
158 function (next) { 170 function (next) {
@@ -173,6 +185,9 @@ describe('Test advanced friends', function () {
173 // Pod 6 ask pod 1, 2 and 3 185 // Pod 6 ask pod 1, 2 and 3
174 function (next) { 186 function (next) {
175 makeFriends(6, next) 187 makeFriends(6, next)
188 },
189 function (next) {
190 setTimeout(next, 11000)
176 }], 191 }],
177 function (err) { 192 function (err) {
178 if (err) throw err 193 if (err) throw err
@@ -247,7 +262,7 @@ describe('Test advanced friends', function () {
247 262
248 done() 263 done()
249 }) 264 })
250 }, 5000) 265 }, 11000)
251 }) 266 })
252 }) 267 })
253 268