From 7b4b520700b9be501460edf4253139921410114e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Vadal=C3=A0?= Date: Sun, 26 Dec 2021 00:45:49 +0100 Subject: [PATCH 1/2] adds workaround issue 30 --- test/BusHelper.spec.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/BusHelper.spec.js b/test/BusHelper.spec.js index 3d3998d..8e594f3 100644 --- a/test/BusHelper.spec.js +++ b/test/BusHelper.spec.js @@ -24,6 +24,13 @@ afterAll(async () => { dbus.unexport(TEST_OBJECT, iface) await dbus.releaseName(TEST_NAME) await dbus.disconnect() + /** + * sometimes disconnect() is slow and throws the following error https://github.com/chrvadala/node-ble/issues/30 + * looks like that wait the cb here doesn't solve the issue https://github.com/dbusjs/node-dbus-next/blob/b2a6b89e79de423debb4475452db1cc410beab41/lib/bus.js#L265 + */ + await new Promise((resolve, reject) => { + setTimeout(resolve, 50) + }) }) test('props/prop', async () => { From 355425e039a5f4f848f2ffe5e8018ec45c0e8718 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Vadal=C3=A0?= Date: Sun, 26 Dec 2021 00:48:09 +0100 Subject: [PATCH 2/2] adds nodejs 16 support --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9f2f0aa..9c14de9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,7 +10,7 @@ jobs: strategy: matrix: os: [ ubuntu-20.04 ] - node: [ 10, 12, 14 ] + node: [ 10, 12, 14, 16 ] name: Test Nodejs v${{ matrix.node }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} steps: