]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/requests.js
Move tags in another table
[github/Chocobozzz/PeerTube.git] / server / tests / api / requests.js
index 7e790b54b8326cfc1176d9fbf2da2c72a1669ac7..933ed29b466ee585c2291c01140bb250fb3cb3da 100644 (file)
@@ -79,15 +79,16 @@ describe('Test requests stats', function () {
     uploadVideo(server, function (err) {
       if (err) throw err
 
-      getRequestsStats(server, function (err, res) {
-        if (err) throw err
+      setTimeout(function () {
+        getRequestsStats(server, function (err, res) {
+          if (err) throw err
 
-        const body = res.body
-        expect(body.totalRequests).to.equal(1)
+          const body = res.body
+          expect(body.totalRequests).to.equal(1)
 
-        // Wait one cycle
-        setTimeout(done, 10000)
-      })
+          done()
+        })
+      }, 1000)
     })
   })