Skip to content

Commit

Permalink
Merge pull request #34 from chrvadala/workaround-issue-30
Browse files Browse the repository at this point in the history
Workaround issue #30
  • Loading branch information
chrvadala authored Dec 27, 2021
2 parents 06402db + 355425e commit 2afef8f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
7 changes: 7 additions & 0 deletions test/BusHelper.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down

0 comments on commit 2afef8f

Please sign in to comment.