Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix test (#71)

Green-Star5fe7e898316e
diff --git a/server/tests/api/check-params/users.js b/server/tests/api/check-params/users.js
index 0ba5e77c38..2c1189f7a5 100644
--- a/server/tests/api/check-params/users.js
+++ b/server/tests/api/check-params/users.js
@@ -23,7 +23,7 @@ describe('Test users API validators', function () {
// ---------------------------------------------------------------
before(function (done) {
- this.timeout(20000)
+ this.timeout(120000)
series([
function (next) {
diff --git a/server/tests/api/check-params/video-blacklists.js b/server/tests/api/check-params/video-blacklists.js
index a39ab0cfa5..53b503e561 100644
--- a/server/tests/api/check-params/video-blacklists.js
+++ b/server/tests/api/check-params/video-blacklists.js
@@ -17,7 +17,7 @@ describe('Test video blacklists API validators', function () {
// ---------------------------------------------------------------
before(function (done) {
- this.timeout(20000)
+ this.timeout(120000)
series([
function (next) {
diff --git a/server/tests/api/check-params/videos.js b/server/tests/api/check-params/videos.js
index ec4cc4ce87..ce6c495832 100644
--- a/server/tests/api/check-params/videos.js
+++ b/server/tests/api/check-params/videos.js
@@ -378,7 +378,7 @@ describe('Test videos API validator', function () {
})
it('Should succeed with the correct parameters', function (done) {
- this.timeout(5000)
+ this.timeout(10000)
const data = {
name: 'my super name',
@@ -392,6 +392,7 @@ describe('Test videos API validator', function () {
const attach = {
'videofile': pathUtils.join(__dirname, '..', 'fixtures', 'video_short.webm')
}
+
requestsUtils.makePostUploadRequest(server.url, path, server.accessToken, data, attach, function () {
attach.videofile = pathUtils.join(__dirname, '..', 'fixtures', 'video_short.mp4')
requestsUtils.makePostUploadRequest(server.url, path, server.accessToken, data, attach, function () {
diff --git a/server/tests/api/config.js b/server/tests/api/config.js
index 08f955f2d0..e79e12823b 100644
--- a/server/tests/api/config.js
+++ b/server/tests/api/config.js
@@ -13,7 +13,7 @@ describe('Test config', function () {
let server = null
before(function (done) {
- this.timeout(20000)
+ this.timeout(120000)
series([
function (next) {
diff --git a/server/tests/api/friends-advanced.js b/server/tests/api/friends-advanced.js
index d433e97d02..237cb533d5 100644
--- a/server/tests/api/friends-advanced.js
+++ b/server/tests/api/friends-advanced.js
@@ -46,7 +46,7 @@ describe('Test advanced friends', function () {
// ---------------------------------------------------------------
before(function (done) {
- this.timeout(30000)
+ this.timeout(120000)
serversUtils.flushAndRunMultipleServers(6, function (serversRun, urlsRun) {
servers = serversRun
diff --git a/server/tests/api/friends-basic.js b/server/tests/api/friends-basic.js
index 658e54829b..4c2043b398 100644
--- a/server/tests/api/friends-basic.js
+++ b/server/tests/api/friends-basic.js
@@ -47,7 +47,7 @@ describe('Test basic friends', function () {
// ---------------------------------------------------------------
before(function (done) {
- this.timeout(20000)
+ this.timeout(120000)
serversUtils.flushAndRunMultipleServers(3, function (serversRun, urlsRun) {
servers = serversRun
@@ -76,7 +76,7 @@ describe('Test basic friends', function () {
})
it('Should make friends', function (done) {
- this.timeout(40000)
+ this.timeout(120000)
series([
// The second pod make friend with the third
@@ -142,11 +142,14 @@ describe('Test basic friends', function () {
})
it('Should not be allowed to make friend again', function (done) {
+ this.timeout(10000)
const server = servers[1]
podsUtils.makeFriends(server.url, server.accessToken, 409, done)
})
it('Should quit friends of pod 2', function (done) {
+ this.timeout(10000)
+
series([
// Pod 1 quit friends
function (next) {
@@ -183,7 +186,7 @@ describe('Test basic friends', function () {
})
it('Should allow pod 2 to make friend again', function (done) {
- this.timeout(20000)
+ this.timeout(120000)
const server = servers[1]
podsUtils.makeFriends(server.url, server.accessToken, function () {
diff --git a/server/tests/api/multiple-pods.js b/server/tests/api/multiple-pods.js
index c1b5fc9f5b..c3ee77f0c9 100644
--- a/server/tests/api/multiple-pods.js
+++ b/server/tests/api/multiple-pods.js
@@ -22,7 +22,7 @@ describe('Test multiple pods', function () {
const toRemove = []
before(function (done) {
- this.timeout(30000)
+ this.timeout(120000)
series([
// Run servers
@@ -230,7 +230,7 @@ describe('Test multiple pods', function () {
})
it('Should upload two videos on pod 3 and propagate on each pod', function (done) {
- this.timeout(30000)
+ this.timeout(45000)
series([
function (next) {
@@ -260,7 +260,7 @@ describe('Test multiple pods', function () {
videosUtils.uploadVideo(servers[2].url, servers[2].accessToken, videoAttributes, next)
},
function (next) {
- setTimeout(next, 22000)
+ setTimeout(next, 33000)
}],
function (err) {
if (err) throw err
diff --git a/server/tests/api/request-schedulers.js b/server/tests/api/request-schedulers.js
index c5c443f14f..c5ea72a6a1 100644
--- a/server/tests/api/request-schedulers.js
+++ b/server/tests/api/request-schedulers.js
@@ -37,7 +37,7 @@ describe('Test requests schedulers stats', function () {
// ---------------------------------------------------------------
before(function (done) {
- this.timeout(20000)
+ this.timeout(120000)
serversUtils.flushAndRunMultipleServers(2, function (serversRun, urlsRun) {
servers = serversRun
diff --git a/server/tests/api/single-pod.js b/server/tests/api/single-pod.js
index fe388698f9..e08da05172 100644
--- a/server/tests/api/single-pod.js
+++ b/server/tests/api/single-pod.js
@@ -22,7 +22,7 @@ describe('Test a single pod', function () {
let videosListBase = null
before(function (done) {
- this.timeout(20000)
+ this.timeout(120000)
series([
function (next) {
@@ -181,7 +181,8 @@ describe('Test a single pod', function () {
if (err) throw err
expect(test).to.equal(true)
- done()
+ // Wait the async views increment
+ setTimeout(done, 500)
})
})
})
diff --git a/server/tests/api/users.js b/server/tests/api/users.js
index 10c96baeb2..74477ae2d8 100644
--- a/server/tests/api/users.js
+++ b/server/tests/api/users.js
@@ -21,7 +21,7 @@ describe('Test users', function () {
let userId = null
before(function (done) {
- this.timeout(20000)
+ this.timeout(120000)
series([
function (next) {
diff --git a/server/tests/api/video-abuse.js b/server/tests/api/video-abuse.js
index c2b6186bd8..be35a361da 100644
--- a/server/tests/api/video-abuse.js
+++ b/server/tests/api/video-abuse.js
@@ -17,7 +17,7 @@ describe('Test video abuses', function () {
let servers = []
before(function (done) {
- this.timeout(40000)
+ this.timeout(100000)
series([
// Run servers
diff --git a/server/tests/api/video-blacklist.js b/server/tests/api/video-blacklist.js
index 20b7c5de3b..79a2fec8d3 100644
--- a/server/tests/api/video-blacklist.js
+++ b/server/tests/api/video-blacklist.js
@@ -17,7 +17,7 @@ describe('Test video blacklists', function () {
let servers = []
before(function (done) {
- this.timeout(40000)
+ this.timeout(120000)
series([
// Run servers