Decrease the waiting time in the advanced friends test
This commit is contained in:
parent
8d6ae227e5
commit
1d7974c758
1 changed files with 25 additions and 29 deletions
|
@ -83,45 +83,41 @@
|
||||||
|
|
||||||
// Expulse pod 4 from pod 1 and 2
|
// Expulse pod 4 from pod 1 and 2
|
||||||
uploadVideo(1, function () {
|
uploadVideo(1, function () {
|
||||||
setTimeout(function () {
|
uploadVideo(2, function () {
|
||||||
uploadVideo(1, function () {
|
setTimeout(function () {
|
||||||
setTimeout(function () {
|
uploadVideo(1, function () {
|
||||||
uploadVideo(2, function () {
|
uploadVideo(2, function () {
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
uploadVideo(2, function () {
|
// Rerun server 4
|
||||||
setTimeout(function () {
|
utils.runServer(4, function (app, url) {
|
||||||
// Rerun server 4
|
apps[3] = app
|
||||||
utils.runServer(4, function (app, url) {
|
getFriendsList(4, function (err, res) {
|
||||||
apps[3] = app
|
if (err) throw err
|
||||||
getFriendsList(4, function (err, res) {
|
// Pod 4 didn't know pod 1 and 2 removed it
|
||||||
|
expect(res.body.length).to.equal(3)
|
||||||
|
|
||||||
|
// Pod 6 ask pod 1, 2 and 3
|
||||||
|
makeFriend(6, function () {
|
||||||
|
getFriendsList(6, function (err, res) {
|
||||||
if (err) throw err
|
if (err) throw err
|
||||||
// Pod 4 didn't know pod 1 and 2 removed it
|
|
||||||
expect(res.body.length).to.equal(3)
|
|
||||||
|
|
||||||
// Pod 6 ask pod 1, 2 and 3
|
// Pod 4 should not be our friend
|
||||||
makeFriend(6, function () {
|
var result = res.body
|
||||||
getFriendsList(6, function (err, res) {
|
expect(result.length).to.equal(3)
|
||||||
if (err) throw err
|
for (var pod of result) {
|
||||||
|
expect(pod.url).not.equal(urls[3])
|
||||||
|
}
|
||||||
|
|
||||||
// Pod 4 should not be our friend
|
done()
|
||||||
var result = res.body
|
|
||||||
expect(result.length).to.equal(3)
|
|
||||||
for (var pod of result) {
|
|
||||||
expect(pod.url).not.equal(urls[3])
|
|
||||||
}
|
|
||||||
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}, 15000)
|
})
|
||||||
})
|
})
|
||||||
}, 15000)
|
}, 15000)
|
||||||
})
|
})
|
||||||
}, 15000)
|
})
|
||||||
})
|
}, 11000)
|
||||||
}, 15000)
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue