From ee969f5e088254a4f11d6c90254c8d013d00cf7d Mon Sep 17 00:00:00 2001 From: Daniel Lando Date: Tue, 7 Jan 2020 15:48:17 +0100 Subject: [PATCH 1/2] Fixing failing tests with aedes-persistence-mongodb (#35) * WIP: Fixing failing tests with aedes-persistence-mongodb * fix: test 'add outgoing packet as a string and pump' --- abstract.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/abstract.js b/abstract.js index eed5739..fba41db 100644 --- a/abstract.js +++ b/abstract.js @@ -779,7 +779,6 @@ function abstractPersistence (opts) { stream.pipe(concat(function (list) { var packet = list[0] - t.ok(Object.prototype.hasOwnProperty.call(packet, 'messageId')) t.equal(packet.messageId, undefined, 'should have an unassigned messageId in queue') delete packet.messageId t.deepEqual(packet, expected, 'must return the packet') @@ -832,7 +831,6 @@ function abstractPersistence (opts) { var stream = instance.outgoingStream(client) stream.pipe(concat(function (list) { var packet = list[0] - t.ok(Object.prototype.hasOwnProperty.call(packet, 'messageId')) t.equal(packet.messageId, undefined, 'should have an unassigned messageId in queue') delete packet.messageId t.deepEqual(packet, expected, 'must return the packet') @@ -840,7 +838,6 @@ function abstractPersistence (opts) { var stream2 = instance.outgoingStream(client2) stream2.pipe(concat(function (list) { var packet = list[0] - t.ok(Object.prototype.hasOwnProperty.call(packet, 'messageId')) t.equal(packet.messageId, undefined, 'should have an unassigned messageId in queue') delete packet.messageId t.deepEqual(packet, expected, 'must return the packet') @@ -885,8 +882,8 @@ function abstractPersistence (opts) { instance.outgoingUpdate(client, data, function (_, client, packet) { queue.push(packet) + next() }) - next() }), function done () { t.equal(queue.length, 2) if (queue.length === 2) { @@ -935,7 +932,6 @@ function abstractPersistence (opts) { stream.pipe(concat(function (list) { var packet = list[0] - t.ok(Object.prototype.hasOwnProperty.call(packet, 'messageId')) t.equal(packet.messageId, undefined, 'should have an unassigned messageId in queue') delete packet.messageId t.deepEqual(packet, expected, 'must return the packet') @@ -981,7 +977,6 @@ function abstractPersistence (opts) { stream.pipe(concat(function (list) { var packet = list[0] - t.ok(Object.prototype.hasOwnProperty.call(packet, 'messageId')) t.equal(packet.messageId, undefined, 'should have an unassigned messageId in queue') delete packet.messageId t.deepEqual(packet, expected, 'must return the packet') From 09795ef5639298832a56b4b9de93932f41df7219 Mon Sep 17 00:00:00 2001 From: Matteo Collina Date: Tue, 7 Jan 2020 15:49:55 +0100 Subject: [PATCH 2/2] Bumped v7.1.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a3c11d2..4c5fc3a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aedes-persistence", - "version": "7.1.1", + "version": "7.1.2", "description": "The spec for an Aedes persistence, with abstract tests and a fast in-memory implementation.", "main": "persistence.js", "scripts": {