Try to fix travis build
authorChocobozzz <florian.bigard@gmail.com>
Thu, 12 Jan 2017 09:06:03 +0000 (10:06 +0100)
committerChocobozzz <florian.bigard@gmail.com>
Thu, 12 Jan 2017 09:06:03 +0000 (10:06 +0100)
server/tests/api/multiple-pods.js
server/tests/api/single-pod.js
server/tests/real-world/real-world.js

index 169a9f2e0d01c0e514e1200288e269468b52aa94..df12ba0e95ab0ab196af3d3e93c0809fde87602b 100644 (file)
@@ -312,7 +312,7 @@ describe('Test multiple pods', function () {
           expect(torrent.files.length).to.equal(1)
           expect(torrent.files[0].path).to.exist.and.to.not.equal('')
 
-          webtorrent.remove(video.magnetUri, done)
+          done()
         })
       })
     })
@@ -331,7 +331,7 @@ describe('Test multiple pods', function () {
           expect(torrent.files.length).to.equal(1)
           expect(torrent.files[0].path).to.exist.and.to.not.equal('')
 
-          webtorrent.remove(video.magnetUri, done)
+          done()
         })
       })
     })
@@ -350,7 +350,7 @@ describe('Test multiple pods', function () {
           expect(torrent.files.length).to.equal(1)
           expect(torrent.files[0].path).to.exist.and.to.not.equal('')
 
-          webtorrent.remove(video.magnetUri, done)
+          done()
         })
       })
     })
@@ -369,7 +369,7 @@ describe('Test multiple pods', function () {
           expect(torrent.files.length).to.equal(1)
           expect(torrent.files[0].path).to.exist.and.to.not.equal('')
 
-          webtorrent.remove(video.magnetUri, done)
+          done()
         })
       })
     })
@@ -419,7 +419,7 @@ describe('Test multiple pods', function () {
               expect(torrent.files.length).to.equal(1)
               expect(torrent.files[0].path).to.exist.and.to.not.equal('')
 
-              webtorrent.remove(videoUpdated.magnetUri, callback)
+              callback()
             })
           })
         })
index 04b93fac7dce526f9aa0f0c81bdcfda79f0db085..2ac83bbf415a8369515ab98fd3a3cb28d8fd04c4 100644 (file)
@@ -96,7 +96,7 @@ describe('Test a single pod', function () {
           expect(torrent.files.length).to.equal(1)
           expect(torrent.files[0].path).to.exist.and.to.not.equal('')
 
-          webtorrent.remove(video.magnetUri, done)
+          done()
         })
       })
     })
index 941e43a2e72b18f69732802c8e612ce5a3944c86..12ab06d6d4c030d4a295ae077a464fa755f6c51d 100644 (file)
@@ -30,16 +30,16 @@ const removeWeight = program.remove !== undefined ? parseInt(program.remove) : 4
 const updateWeight = program.update !== undefined ? parseInt(program.update) : 4
 const flushAtExit = program.flush || false
 const actionInterval = program.action !== undefined ? parseInt(program.action) : 500
-let integrityInterval = program.integrity !== undefined ? parseInt(program.integrity) : 60000
+const integrityInterval = program.integrity !== undefined ? parseInt(program.integrity) : 60000
 const displayDiffOnFail = program.integrity || false
 
 const numberOfPods = 6
 
 // Wait requests between pods
-const baseRequestInterval = integrityInterval < constants.REQUESTS_INTERVAL ? integrityInterval : constants.REQUESTS_INTERVAL
+const baseRequestInterval = integrityInterval < constants.REQUESTS_INTERVAL ? constants.REQUESTS_INTERVAL : integrityInterval
 const requestsMaxPerInterval = baseRequestInterval / actionInterval
 const intervalsToMakeAllRequests = Math.ceil(requestsMaxPerInterval / constants.REQUESTS_LIMIT_PER_POD)
-const waitForBeforeIntegrityCheck = (intervalsToMakeAllRequests * constants.REQUESTS_INTERVAL) + 1000
+const waitForBeforeIntegrityCheck = (intervalsToMakeAllRequests * constants.REQUESTS_INTERVAL) - integrityInterval + 1000
 
 console.log('Create weight: %d, update weight: %d, remove weight: %d.', createWeight, updateWeight, removeWeight)
 if (flushAtExit) {