forked from Azure/azure-sdk-for-js
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Service Bus] Do not create a new one if the message session doesn't …
…exist before performing the session related operations (Azure#8849) * throw if messagesession doesn't exist * Update error to SessionLockLost * Update sdk/servicebus/service-bus/src/receivers/sessionReceiver.ts Co-authored-by: Ramya Rao <ramya.rao.a@outlook.com> * Convention for amqpErrors * _throwIfSessionLockExpired and some refactoring * _throwIfMessageSessionDoesntExist * Update sdk/servicebus/service-bus/src/receivers/sessionReceiver.ts Co-authored-by: Ramya Rao <ramya.rao.a@outlook.com> * refactoring + error message change * Add checks for _throwIfMessageSessionDoesntExist * unneeded check * remove unneeded error variable * unneeded awaits * Get the if-check working that is present before `await MessageSession.create` * Update sdk/servicebus/service-bus/src/receivers/sessionReceiver.ts Co-authored-by: Ramya Rao <ramya.rao.a@outlook.com> * remove export * remove _throwIfMessageSessionDoesntExist * Revert "remove _throwIfMessageSessionDoesntExist" This reverts commit 281b82c. * remove unneeded if check * Move checks from init to sessionReceiver * async iife * Update sdk/servicebus/service-bus/src/receivers/sessionReceiver.ts Co-authored-by: Ramya Rao <ramya.rao.a@outlook.com> * remove this._throwIfMessageSessionDoesntExist(); for managementLink operations * move back the followups to init with the new if-check * ! for the this.sessionId * Fix getReceiverClosedErrorMsg * Update sdk/servicebus/service-bus/src/receivers/sessionReceiver.ts Co-authored-by: Ramya Rao <ramya.rao.a@outlook.com> * Update sdk/servicebus/service-bus/src/session/messageSession.ts Co-authored-by: Ramya Rao <ramya.rao.a@outlook.com> * async iife -> catch * getSender -> createSender * Simplify isClosed * fix typos * Merge _throwIfMessageSessionDoesntExist and _throwIfReceiverOrConnectionClosed * Update sdk/servicebus/service-bus/src/util/errors.ts Co-authored-by: Ramya Rao <ramya.rao.a@outlook.com> * Add !this._messageSession.isOpen() too to the isClosed * fix test * Fix retries test "Unpartitioned Queue with Sessions: receiveBatch" * fix "An already locked session throws SessionCannotBeLockedError" test * fix tests under "SessionReceiver with invalid sessionId" * fix mock function for non-sessions * Moving if checks back to init * removing if checks from sessionReceiver in favour of init * formatting * Update sdk/servicebus/service-bus/src/session/messageSession.ts * Update sdk/servicebus/service-bus/src/receivers/sessionReceiver.ts Co-authored-by: Ramya Rao <ramya.rao.a@outlook.com> * Update sdk/servicebus/service-bus/src/session/messageSession.ts * refactor _throwIfReceiverOrConnectionClosed * remove redundant else block as per Azure#8849 (comment) * typos * Split sessionId into providedSessionId and sessionId * Make providedSessionId a private var and organize imports * unneeded if check since it is covered in _throwIfReceiverOrConnectionClosed Co-authored-by: Ramya Rao <ramya.rao.a@outlook.com>
- Loading branch information
1 parent
033b09b
commit 735eca2
Showing
7 changed files
with
94 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.