Skip to content

Commit

Permalink
Stabilize IdentityDeletionPeerProcessing test (#273)
Browse files Browse the repository at this point in the history
  • Loading branch information
Milena-Czierlinski authored Sep 17, 2024
1 parent 4cf8873 commit 62c1735
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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();
Expand Down

0 comments on commit 62c1735

Please sign in to comment.