From 62c1735da1330b09c0588ef23d320e18fe46cf39 Mon Sep 17 00:00:00 2001 From: Milena Czierlinski <146972016+Milena-Czierlinski@users.noreply.github.com> Date: Tue, 17 Sep 2024 17:29:05 +0200 Subject: [PATCH] Stabilize IdentityDeletionPeerProcessing test (#273) --- .../test/transport/identityDeletionPeerProcessing.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/runtime/test/transport/identityDeletionPeerProcessing.test.ts b/packages/runtime/test/transport/identityDeletionPeerProcessing.test.ts index 6d10d113b..8634b97ea 100644 --- a/packages/runtime/test/transport/identityDeletionPeerProcessing.test.ts +++ b/packages/runtime/test/transport/identityDeletionPeerProcessing.test.ts @@ -43,6 +43,7 @@ describe("IdentityDeletionProcess", () => { await services1.transport.identityDeletionProcesses.initiateIdentityDeletionProcess(); await syncUntilHasEvent(services2, PeerToBeDeletedEvent, (e) => e.data.id === relationshipId); + await services2.eventBus.waitForRunningEventHandlers(); const updatedRelationship = (await services2.transport.relationships.getRelationship({ id: relationshipId })).value; expect(updatedRelationship.peerDeletionInfo!.deletionStatus).toBe(PeerDeletionStatus.ToBeDeleted); @@ -53,6 +54,7 @@ describe("IdentityDeletionProcess", () => { await services1.transport.identityDeletionProcesses.cancelIdentityDeletionProcess(); await syncUntilHasEvent(services2, PeerDeletionCancelledEvent, (e) => e.data.id === relationshipId); + await services2.eventBus.waitForRunningEventHandlers(); const updatedRelationship = (await services2.transport.relationships.getRelationship({ id: relationshipId })).value; expect(updatedRelationship.peerDeletionInfo).toBeUndefined();