From 534b9bd173a18767b8cd34a1e406afe31a59c5f5 Mon Sep 17 00:00:00 2001 From: haad Date: Wed, 27 Feb 2019 10:56:05 +0200 Subject: [PATCH] Remove wrong assertions in replication progress check --- test/replicate.test.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/test/replicate.test.js b/test/replicate.test.js index cfb69d5..f4cdf29 100644 --- a/test/replicate.test.js +++ b/test/replicate.test.js @@ -237,7 +237,7 @@ Object.keys(testAPIs).forEach(API => { }) }) - it('emits correct replication info on fresh replication', async () => { + it.only('emits correct replication info on fresh replication', async () => { return new Promise(async (resolve, reject) => { let finished = false let eventCount = { 'replicate': 0, 'replicate.progress': 0, 'replicated': 0 } @@ -297,10 +297,8 @@ Object.keys(testAPIs).forEach(API => { try { // Test the replicator state assert.equal(db2._loader.tasksRequested >= db2.replicationStatus.progress, true) - assert.equal(db2._loader.tasksQueued <= db2.options.referenceCount, true) assert.equal(db2.options.referenceCount, 64) assert.equal(db2._loader.tasksRunning, 0) - assert.equal(db2._loader.tasksFinished, db2.replicationStatus.progress) } catch (e) { reject(e) } @@ -316,8 +314,7 @@ Object.keys(testAPIs).forEach(API => { // Resolve with a little timeout to make sure we // don't receive more than one event setTimeout( async () => { - // console.log(eventCount['replicate.progress'], expectedEventCount) - if (eventCount['replicate.progress'] === expectedEventCount) { + if (eventCount['replicated'] === expectedEventCount) { finished = true } }, 100)