From 0b63aaf18d3e5741a6869c2815188b0540494db9 Mon Sep 17 00:00:00 2001 From: gabe Date: Tue, 31 Oct 2023 16:57:48 -0700 Subject: [PATCH] timeout --- packages/dids/tests/dht.spec.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/dids/tests/dht.spec.ts b/packages/dids/tests/dht.spec.ts index 9c889e9a0..ce84e8d64 100644 --- a/packages/dids/tests/dht.spec.ts +++ b/packages/dids/tests/dht.spec.ts @@ -4,6 +4,7 @@ import {DidDht} from '../src/dht.js'; import {DidDhtKeySet, DidDhtMethod} from '../src/did-dht.js'; import {DidKeySetVerificationMethodKey, DidService} from '../src/index.js'; + describe('DHT', function () { this.timeout('15000'); // 15 seconds @@ -21,6 +22,10 @@ describe('DHT', function () { expect(published).to.be.true; + // wait for propagation + const wait = ms => new Promise(resolve => setTimeout(resolve, ms)); + await wait(1000*10); + const gotDid = await DidDht.getDidDocument(document.id); expect(gotDid.id).to.deep.equal(document.id); expect(gotDid.capabilityDelegation).to.deep.equal(document.capabilityDelegation);