Skip to content

Commit

Permalink
[Service Bus] Flaky Test - Report a meaningful error (#13311)
Browse files Browse the repository at this point in the history
  • Loading branch information
HarshaNalluru authored Jan 21, 2021
1 parent 28a534f commit f921bae
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions sdk/servicebus/service-bus/test/backupMessageSettlement.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,11 +366,15 @@ describe("Message settlement After Receiver is Closed - Through ManagementLink",
);
await receiver.completeMessage(msg);
} catch (err) {
should.equal(
err.message,
`Invalid operation on the message, message lock doesn't exist when dealing with sessions`,
"Unexpected error thrown"
);
if (!entityNames.usesSessions) {
throw err;
} else {
should.equal(
err.message,
`Invalid operation on the message, message lock doesn't exist when dealing with sessions`,
"Unexpected error thrown"
);
}
errorWasThrown = true;
}

Expand Down

0 comments on commit f921bae

Please sign in to comment.