aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-01-12 10:06:03 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-01-12 10:06:03 +0100
commit790e65fcf7a0a9f065ecc68c5982efb80cd2e1ca (patch)
treecf398ea3bf7488becd39746c2e292c3696c7b6d0 /server
parent7f4e7c36373217b8e92cf227c71999a0ce9a15d9 (diff)
downloadPeerTube-790e65fcf7a0a9f065ecc68c5982efb80cd2e1ca.tar.gz
PeerTube-790e65fcf7a0a9f065ecc68c5982efb80cd2e1ca.tar.zst
PeerTube-790e65fcf7a0a9f065ecc68c5982efb80cd2e1ca.zip
Try to fix travis build
Diffstat (limited to 'server')
-rw-r--r--server/tests/api/multiple-pods.js10
-rw-r--r--server/tests/api/single-pod.js2
-rw-r--r--server/tests/real-world/real-world.js6
3 files changed, 9 insertions, 9 deletions
diff --git a/server/tests/api/multiple-pods.js b/server/tests/api/multiple-pods.js
index 169a9f2e0..df12ba0e9 100644
--- a/server/tests/api/multiple-pods.js
+++ b/server/tests/api/multiple-pods.js
@@ -312,7 +312,7 @@ describe('Test multiple pods', function () {
312 expect(torrent.files.length).to.equal(1) 312 expect(torrent.files.length).to.equal(1)
313 expect(torrent.files[0].path).to.exist.and.to.not.equal('') 313 expect(torrent.files[0].path).to.exist.and.to.not.equal('')
314 314
315 webtorrent.remove(video.magnetUri, done) 315 done()
316 }) 316 })
317 }) 317 })
318 }) 318 })
@@ -331,7 +331,7 @@ describe('Test multiple pods', function () {
331 expect(torrent.files.length).to.equal(1) 331 expect(torrent.files.length).to.equal(1)
332 expect(torrent.files[0].path).to.exist.and.to.not.equal('') 332 expect(torrent.files[0].path).to.exist.and.to.not.equal('')
333 333
334 webtorrent.remove(video.magnetUri, done) 334 done()
335 }) 335 })
336 }) 336 })
337 }) 337 })
@@ -350,7 +350,7 @@ describe('Test multiple pods', function () {
350 expect(torrent.files.length).to.equal(1) 350 expect(torrent.files.length).to.equal(1)
351 expect(torrent.files[0].path).to.exist.and.to.not.equal('') 351 expect(torrent.files[0].path).to.exist.and.to.not.equal('')
352 352
353 webtorrent.remove(video.magnetUri, done) 353 done()
354 }) 354 })
355 }) 355 })
356 }) 356 })
@@ -369,7 +369,7 @@ describe('Test multiple pods', function () {
369 expect(torrent.files.length).to.equal(1) 369 expect(torrent.files.length).to.equal(1)
370 expect(torrent.files[0].path).to.exist.and.to.not.equal('') 370 expect(torrent.files[0].path).to.exist.and.to.not.equal('')
371 371
372 webtorrent.remove(video.magnetUri, done) 372 done()
373 }) 373 })
374 }) 374 })
375 }) 375 })
@@ -419,7 +419,7 @@ describe('Test multiple pods', function () {
419 expect(torrent.files.length).to.equal(1) 419 expect(torrent.files.length).to.equal(1)
420 expect(torrent.files[0].path).to.exist.and.to.not.equal('') 420 expect(torrent.files[0].path).to.exist.and.to.not.equal('')
421 421
422 webtorrent.remove(videoUpdated.magnetUri, callback) 422 callback()
423 }) 423 })
424 }) 424 })
425 }) 425 })
diff --git a/server/tests/api/single-pod.js b/server/tests/api/single-pod.js
index 04b93fac7..2ac83bbf4 100644
--- a/server/tests/api/single-pod.js
+++ b/server/tests/api/single-pod.js
@@ -96,7 +96,7 @@ describe('Test a single pod', function () {
96 expect(torrent.files.length).to.equal(1) 96 expect(torrent.files.length).to.equal(1)
97 expect(torrent.files[0].path).to.exist.and.to.not.equal('') 97 expect(torrent.files[0].path).to.exist.and.to.not.equal('')
98 98
99 webtorrent.remove(video.magnetUri, done) 99 done()
100 }) 100 })
101 }) 101 })
102 }) 102 })
diff --git a/server/tests/real-world/real-world.js b/server/tests/real-world/real-world.js
index 941e43a2e..12ab06d6d 100644
--- a/server/tests/real-world/real-world.js
+++ b/server/tests/real-world/real-world.js
@@ -30,16 +30,16 @@ const removeWeight = program.remove !== undefined ? parseInt(program.remove) : 4
30const updateWeight = program.update !== undefined ? parseInt(program.update) : 4 30const updateWeight = program.update !== undefined ? parseInt(program.update) : 4
31const flushAtExit = program.flush || false 31const flushAtExit = program.flush || false
32const actionInterval = program.action !== undefined ? parseInt(program.action) : 500 32const actionInterval = program.action !== undefined ? parseInt(program.action) : 500
33let integrityInterval = program.integrity !== undefined ? parseInt(program.integrity) : 60000 33const integrityInterval = program.integrity !== undefined ? parseInt(program.integrity) : 60000
34const displayDiffOnFail = program.integrity || false 34const displayDiffOnFail = program.integrity || false
35 35
36const numberOfPods = 6 36const numberOfPods = 6
37 37
38// Wait requests between pods 38// Wait requests between pods
39const baseRequestInterval = integrityInterval < constants.REQUESTS_INTERVAL ? integrityInterval : constants.REQUESTS_INTERVAL 39const baseRequestInterval = integrityInterval < constants.REQUESTS_INTERVAL ? constants.REQUESTS_INTERVAL : integrityInterval
40const requestsMaxPerInterval = baseRequestInterval / actionInterval 40const requestsMaxPerInterval = baseRequestInterval / actionInterval
41const intervalsToMakeAllRequests = Math.ceil(requestsMaxPerInterval / constants.REQUESTS_LIMIT_PER_POD) 41const intervalsToMakeAllRequests = Math.ceil(requestsMaxPerInterval / constants.REQUESTS_LIMIT_PER_POD)
42const waitForBeforeIntegrityCheck = (intervalsToMakeAllRequests * constants.REQUESTS_INTERVAL) + 1000 42const waitForBeforeIntegrityCheck = (intervalsToMakeAllRequests * constants.REQUESTS_INTERVAL) - integrityInterval + 1000
43 43
44console.log('Create weight: %d, update weight: %d, remove weight: %d.', createWeight, updateWeight, removeWeight) 44console.log('Create weight: %d, update weight: %d, remove weight: %d.', createWeight, updateWeight, removeWeight)
45if (flushAtExit) { 45if (flushAtExit) {